Page 1 of 1

Poor performance with (local) sorting a lookupfield

Posted: Sun 06 May 2007 12:09
by boudewijn
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.

Posted: Mon 07 May 2007 07:59
by Antaeus
Try to enable (set to True) the CacheCalcFields option of TMyQuery that contains the lookup field. This should greatly increase the sorting speed.