Compacting a database

D

Dan

Does it do any good to compact the front end of a database or should you only
compact the backend?
 
O

Ofer

Taking from Microsoft site, about compact

The following is a list of actions that the compact process performs:
• It reorganizes the pages of a table so that they reside in adjacent
database pages. This improves performance because the table is no longer
fragmented across the database.
• It reclaims unused space that is created by object and record deletions.
When objects or records are deleted from the database, the space they
occupied is marked as available for new additions to the database. However,
the size of the database never shrinks unless you compact the database. For
databases in which objects and records are frequently added, deleted, and
updated, you should compact frequently.
• It resets incrementing AutoNumber fields so that the next value allocated
will be one more than the highest value in the remaining records. For
example, if all the records in the database have been deleted, after you
compact the database, the value in the AutoNumber field will be 1 when the
next record is added. If the highest remaining AutoNumber value in the
database is 50, after you compact the database, the value in the AutoNumber
field will be 51 when the next record is added. Note that this is true even
if records containing values higher than 50 were added previously but were
deleted prior to compacting.
• It regenerates the table statistics that are used in the query
optimization process. These statistics can become out-of-date over time. This
typically happens if transactions are rolled back or if the database is not
properly closed because of an unexpected power loss or because the computer
is turned off before a program that is using Microsoft Jet has had a change
to quit completely.
• It flags all queries so that they will be recompiled the next time that
the query is run. This is important because database statistics can change
and a previously compiled query may have an inaccurate query plan.

So, Yes. I recomand you do compact the front end, using Access for many
years, it is important compacting the mdb, often.

I actully keep the original on the sever, and the system copy the mdb to
computer every day, so the users get a new and compact DB every time they
start working.
 
Top