Handling Deleted Records

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Optimizing Performance >

Handling Deleted Records

 

If you are hiding records marked for deletion by using TApolloEnv's SetDeleted method, keep in mind that this is not unlike a constantly-active filter. Note that record-level filters are slow, while optimizable index-filters are very fast. Performing sequential Skip operations through a table is much faster with SetDeleted(False).

 

Rather than setting TApolloEnv.SetDeleted(True), you might consider adding the condition '.not. DELETED()' to your index expressions. This would automatically remove keys from the index as records are marked for deletion, and greatly improve performance over the use of SetDeleted(True).