Page 1 of 1
how to imrove the locate record speed in delphi?
Posted: Tue 16 Nov 2004 02:34
by akiraiu
I use the TDataSet.Locate Method to search the specific record, but when the table is large, then the searching speed is slow.
how to improve that? Or there are other way to do the fast locate record in a table??
thx..
Akira
Posted: Tue 16 Nov 2004 07:18
by akiraiu
sth wrong, I use TOrdTable.Locate method to search record is slow~~~
Posted: Tue 16 Nov 2004 15:23
by Paul
Time is spending on loading all needed records from Oracle server before locating record at the first time.
Please set TOraQuery.FetchAll:=True.
Posted: Wed 17 Nov 2004 00:46
by Guest
because my table have about 100,000 record, if FetchAll:=True then, the ODAC will really fetch 100,000 record from server??
if then, it also will take a long time to fetch?!
Posted: Fri 19 Nov 2004 08:40
by Paul
ODAC cannot use indexes that are created on the server for locating record on client. In any case, operation of locating record on client side needs all records to be present. You can increase performance if you choose another methods. Try to organize filtering on server side using FilterSQL property or including WHERE clause to the SQL statement.