compact and repair

D

Database User

My database is 39.4 MB (41,357,312 bytes)

i did compact and repair and it

37.1 MB (38,961,152 bytes)

i think i got the correct details i - took this info from the properties of
my database.

THe database is used quite heavily. On 2 computers (networked) and one of
the computers it is used on many user accounts.

Does this give you an idea of how often i should compact and repair?
what is good practice for this?
 
P

PAOLO

As far as I know the only time you should compact and repair is when you
design new forms, reports and create new queries. Adding data to tables does
not increase the size of the mdb file for any more than it should....
 
D

Douglas J. Steele

While adding data to tables might not increase the size of the MDB file any
more than it should, other things can.

Users might delete records. Running certain queries can add temporary items
to the database that aren't needed after the query has run.

Compacting and repairing on a regular basis is always a good idea.
 
C

Craig Alexander Morrison

You can't do it too much.

If you import and process a lot of data including deletion of unneeded
information from the import you should perform a compact (repair) after each
major import.

If you are amended design objects such as forms, reports etc and are using
vba you should compile and save all and then compact.

If in doubt compact.

Also remember to backup your data by taking a complete copy of the mdb
containing the data at regular intervals. Many do the backup at the same
time as the compact.

Back up the database then compact the live one and at least you always have
the one before the compact (in case something goes awry).
 
C

Craig Alexander Morrison

It is very important to compact and repair to keep the database and its
saved queries optimised.

You can never compact too much, and it mainly affects the data.

Even if you only add data and never delete, by compacting at regular
intervals you ensure that the data in tables is clustered according to PK.
 
D

Database User

so even if i do compact every time i do something major (import or change the
queries) but for the general users of the database can i set the database to
compact and repair every 4 days say at a particular time? but what if the
database is closed.

Also for a different database how can i set a command button to compact and
repair on every 3rd close?
 
Top