Hello,
I'm trying to find the optimal way to set up my lookup fields:
my lookup dataset has key = integer, value = string, ca. 2000 records.
if i use it with default properties, everything is extremely slow (calling an .append on dataset with such lookup field takes 3 milliseconds etc.)
I have found 2 options to make it faster:
1. set lookupcache = true for the lookup field
2. setting indexfieldnames in the lookup dataset to the key field
what is the best setup in your opinion? 1 or 2 or combination of both? or even anything else/more?
Thanks for your ideas,
Ludek.
recommended settings for lookup fields
Re: recommended settings for lookup fields
1. LookupCache is a property of the TField standard class. So please contact Embarcadero developers concerning its usage.
2. The IndexFieldNames property value sets local sorting order of data in the dataset. Lookup fields must work faster when data is ordered by lookup keys in the lookup dataset.
3. Try to set the TMSQuery.Options.CacheCalcFields property of the dataset to True. This may speed up performance of lookup fields as well.
You can test the above approaches both separately and together in order to find the best solution.
2. The IndexFieldNames property value sets local sorting order of data in the dataset. Lookup fields must work faster when data is ordered by lookup keys in the lookup dataset.
3. Try to set the TMSQuery.Options.CacheCalcFields property of the dataset to True. This may speed up performance of lookup fields as well.
You can test the above approaches both separately and together in order to find the best solution.
Re: recommended settings for lookup fields
Thanks especially for the 3rd idea
Re: recommended settings for lookup fields
You are welcome. Feel free to contact us if you have any further questions.