Deleting records in a database table does not reduce the size of the table for most of relational database types. In many database types, it just marks the corresponding records as deleted and their space as ready for reusing. Moreover, the records deletion leads to fragmentation, and thus less effectiveness of the table indexes. The table packing physically removes previously deleted records from the table.

Packing Local BDE Tables

To pack a local BDE table, choose Table | Utilities | Pack menu.

To pack all Paradox (.DB) and dBase (.DBF) tables in a directory, choose Tools | BDE Tools | Pack All Tables....

Packing Tables in Server Databases

To pack tables in SQL-based database, use a SQL query according to your database documentation. For example, to pack a MySQL table, execute the following database query:

OPTIMIZE TABLE <table_name>

If your database does not have a dedicated SQL statement for packing tables, you can try these steps (again, check your database documentation):

1. Make a copy of the table you want to pack.

2. Delete the old table.

3. Rename the new table to the name of the old table.

Notes

1. It is recommended to backup the table before packing. You can use Duplicating Database Tables for this.

2. If you use a FoxPro table with indexes and non-English text data, you cannot pack it in Database Tour.