Vista Software
Tip: RecCount Explained

RecCount Explained

Applies to: Apollo VCL™

Apollo VCL's RecCount property always returns the total number of physical records in the table. Apollo also has a QueryRecCount and Count methods that return values based on total number of records within a Query, Conditional Index, Scope, and also respect the HideDeleted setting.

It is recomended that these methods be called only when absolutely necessary in getting an accurate record count on a table. These methods actually traverse the query, scope, or index physically counting the records that match. On a large dataset, this can be time-intensive.

If, for example, you call QueryRecCount once before entering a loop that will ultimately remove additional records from the filter set, you do not need to call QueryRecCount again inside the looop. A better solution is to simply store the QueryRecCount to a temporary variable and decrement the variable in the loop to establish the new record count.

Back
Apollo Database Engines