Why should I Pack the Database ?

 

This Topic does not apply to the Enterprise Version of Crimestar RMS. The Enterprise Version of Crimestar RMS utilizes a much more robust and high performance SQL database and does not require this action to be performed.

 

CrimeStar uses DBF type database tables to store its data. As is typical with most xbase type database systems, appending records to a table can be done while multiple users are accessing the database as appending a record simply increases the size of the file by adding a record onto the end of the file. However when a record is deleted, it is rarely at the end of the file. Usually it is somewhere in the middle of the file. This means that in order to remove the record from the table all subsequent records would need to be shifted up one record position. It is not possible to do this while multiple users are accessing the database tables. Therefor deleted records are not really deleted, they are simply marked for deletion. Records, which are marked for deletion, are usually ignored by all recall, search and reporting functions. In order to truly remove these records from the tables it is necessary to perform a function referred to as "Packing". When you PACK a table, you open it exclusively and recopy the table specifically omitting any record, which was flagged for deletion. The end result is a table where all deleted records have been removed and the associated disk space they occupied is then recovered.

 

It is a good idea to PACK your database tables periodically, to recover wasted disk space and improved system performance.

 

Remember the Reindex/PACK may take a while to complete, and as always with database structural operations a backup should always be performed first.

 

See: How to PACK the Database