If you have a very large database or have done a lot of maintenance to your database, the database file you are working on can become ‘fragmented’; a computer term for ‘full of holes.’ If you deleted several records from a very large table, Access can compact the file together to eliminate wasted space. Access also performs a few consistency checks on the data to make sure the current file is not corrupted and will attempt to fix any problems. This will increase the performance of data retrieval and processing if the computer doesn’t have to skip over empty spaces. (If you have ever defragmented a hard drive, the principle is the same.) To compact a file, it is a good idea to open Access but do not open any database files. Click Tools à Database Utilities à Compact and Repair Database.
When the Database to Compact From dialogue box appears, navigate to the database you want to compact and click the Compact button:
The compaction process will take anywhere from a few seconds to several minutes, depending on the size and complexity of the database. Access stores a temporary database (the original database but compacted) in the memory of your computer. Once the process has finished, the Compact Database Into dialogue box will appear:
Access will name the ‘new’ compacted database db1, but you can give it any name you like. To simply over-write the ‘old’ uncompressed database, click the name in the dialogue box (My Sample Database) and click Save. The compressed database will be saved.
|