Alternative to TOraTable.Locate?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kurtbilde
Posts: 114
Joined: Wed 16 Mar 2005 16:02
Location: Odense, Denmark

Alternative to TOraTable.Locate?

Post by kurtbilde » Tue 12 Mar 2013 15:49

Hi,

TOraTable.Locate seems to be very "expensive" to use - even when .Locating on the primary key. Is there an alternative, that is less time consuming (in wait time), but still let's me use TOraTable as Dataprovidor for the DB-aware components?

-Kurt

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Alternative to TOraTable.Locate?

Post by AlexP » Wed 13 Mar 2013 09:07

Hello,

Independently on the method of positioning in the DataSet you will use (Locate, LocateEx, FindFirst, FindKey, etc.), data must be loaded to the client for positioning, and if the data volume is large enough, all these methods will cause delay. To increase performance, you can explicitly set the sorting order (ORDER BY) by a needed field or set the FetchAll property to True, that will allow retrieving all records on opening DataSet and to be positioned locally

kurtbilde
Posts: 114
Joined: Wed 16 Mar 2005 16:02
Location: Odense, Denmark

Re: Alternative to TOraTable.Locate?

Post by kurtbilde » Mon 18 Mar 2013 10:17

Hi Alex,

The ORDER BY option doesn't speed up the process and when using FetchAll = true the penalty is paid when using the tOraTable.open (long wait time). Couldn't the unique rowid be used for a special tOraTable.FetchRow(RowId)?!?

-Kurt

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Alternative to TOraTable.Locate?

Post by AlexP » Mon 18 Mar 2013 14:39

Hello,

There is no such functionality at the moment. We plan to implement the possibility to search for a record by a key field without fetching the whole table. We cannot tell the exact terms of this feature implementation yet.

kurtbilde
Posts: 114
Joined: Wed 16 Mar 2005 16:02
Location: Odense, Denmark

Re: Alternative to TOraTable.Locate?

Post by kurtbilde » Thu 21 Mar 2013 15:19

Hopefully very, very soon - this is a major (performance) killer :-O

-Kurt

Post Reply