how to imrove the locate record speed in delphi?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
akiraiu
Posts: 22
Joined: Tue 16 Nov 2004 02:31

how to imrove the locate record speed in delphi?

Post by akiraiu » Tue 16 Nov 2004 02:34

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

akiraiu
Posts: 22
Joined: Tue 16 Nov 2004 02:31

Post by akiraiu » Tue 16 Nov 2004 07:18

sth wrong, I use TOrdTable.Locate method to search record is slow~~~

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 16 Nov 2004 15:23

Time is spending on loading all needed records from Oracle server before locating record at the first time.
Please set TOraQuery.FetchAll:=True.

Guest

Post by Guest » Wed 17 Nov 2004 00:46

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?!

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 19 Nov 2004 08:40

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.

Post Reply