Poor performance with (local) sorting a lookupfield

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
boudewijn
Posts: 4
Joined: Fri 30 Sep 2005 18:13
Location: the netherlands

Poor performance with (local) sorting a lookupfield

Post by boudewijn » Sun 06 May 2007 12:09

Hi,

The most recent build (5.00.1.6) of Mydac makes it posible to sort on lookupfields using the CRdbgrid. (GREAT!)

But:

There is an exeptional time differance between sorting a 'normal' field and a 'lookupfield'. Sorting is triggerd by clicking the column header.
The time difference is far too large:
- normal fields almost instanly.
- lookupfield(s) nearly 30 seconds by approx. 750 records in the crdbgrid).

The windows taskmanager shows the whole time 99% CPU time, and (of coarse) no network activity. (local sort).

The Crdbgrid connects with a Myquery (readonly) via a MyDataSource.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 07 May 2007 07:59

Try to enable (set to True) the CacheCalcFields option of TMyQuery that contains the lookup field. This should greatly increase the sorting speed.

Post Reply