The PACK DATABASE command will remove deleted records from the .dbc itself. To remove deleted records from tables contained within the database you'll need to PACK them individually.
It might be a good idea to consider the need to PACK these HUGE tables. You could mark the records "inactive" and re-use these records when adding new ones.
Depending on the number (and size) of index keys, you may want to delete those first, PACK and then recreate the indexes. Of course if you are using the DBC RI or other persistent relationships, this must be done very carefully.
I do as rgbean suggests on my tables that encounter a lot of traffic (excessive additions and deletions). I add an index named deleted with a tag of deleted() in descending order. When I need to add a new record I simply apply the deleted index, go top, store the record number to a variable, gather the new information, undelete the record, and apply the previously active index. This process has worked very well for a long time for me without incident.
For the less active tables I have a reindex function which steps through each table packing and reindexing them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.