TurboDB VCL Component Library

TTdbDataSet.FilterMethod

TTdbDataSet

Previous  Top  Next

Specifies the filter method to use for next filter.

Delphi syntax:

property FilterMethod: TTdbFilterMethod;

C++ syntax:

__property TTdbFilterMethod FilterMethod;

Description

TurboDB supports incremental and static filtering. Incremental filtering means that the filter is applied to the records during browsing. Static filtering means that the result set of the filter is calculated and stored beforehand much like it is the case with queries. In most cases, static filters are faster and they have the additional advantage of delivering a stable result set with reliable record numbers that can be used for scroll bars etc. However in some special cases incremental filters are much faster then static ones on very large data sets (> 1 Million records):

When the result is a large subset of the whole dataset, e.g. Name <> 'Svyczkovski'.
When an index cannot be applied to speed searching, e.g. Date > 2009-10-03 or Amount < 100000.
When only the first record satisfying the condition is requested.
When a large result must additionally be sorted.

On the other hand, incremental filters have many disadvantages:

The record count cannot be determined.
There is no valid RecNo and therefore no scroll bar possible.
They are very slow on huge data sets with only a few records satisfying the condition, e.g. Name = 'Swyczkovski'.

The FilterMethod property must be set before the Filter property is set. FilterMethod only operates on regular filters, not on word filters.