TVirtualTable IndexFieldNames

TVirtualTable IndexFieldNames

Postby segnew » Thu 14 Jan 2010 15:45

I need a fast method to locate data associated with components I create at runtime. I want everything as efficient as possible with a minimum of programming and am considering using a TVirtualTable.

As an example I have the following:
VT.IndexFieldNames := 'TableName';
VT.Locate('TableName',TargetTableName,[]);

What search method is used to locate the record?

How will performance be effected when I have a very large number of items in the table?

Also, I want to know how efficient the TVirtualTable is from a memory utilization standpoint. In some cases I just have a string(40) index and an integer. In others I have a string(40) index, an integer, and additional data that must be tracked.

How is memory allocated for new records?

Thanks
segnew
 
Posts: 6
Joined: Thu 14 Jan 2010 14:54

Postby Plash » Mon 18 Jan 2010 08:30

If you locate by a field from IndexFieldNames, VirtualTable uses optimal search method. Search can be fast even for a large number of records.

For each new record VirtualTable allocates a memory block which size is sum of fields sizes.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to VirtualDAC