Hello:
Here's a mystery. I have a database that has the "Compact" on close set in the options.
When I open the original and close it, and it has a compacted size of about 6.2 Megabytes.
Now... I make a copy of the original database. I would expect the same size after the close and compact.
But it is not! The copy compacts to 5.9 MB.
Just to make sure, I open and close the original file I copied and it still has 6.2 Megabytes.
Why is that?
Regards,
Rich Locus
Compressing Database Files - Anomalies
-
- 2StarLounger
- Posts: 165
- Joined: 03 Oct 2015, 00:30
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Compressing Database Files - Anomalies
In the first place, there is an element of randomness in the compact algorithm. 'Compact on Close' is turned on in one of the databases that I use almost every day. Although the number of records in the tables only grows (I never delete records in this database), the compacted size sometimes goes up, sometimes down.
In the second place: did you copy the database file, or did you import all database objects into a new database?
In the second place: did you copy the database file, or did you import all database objects into a new database?
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 165
- Joined: 03 Oct 2015, 00:30
Re: Compressing Database Files - Anomalies
Good morning Hans!!
All I did was right click the closed Access Database file, select Copy and then Paste. It was pasted into the same directory as the original (Windows adds the "copy" notation to the copied database.
Thanks!
Rich Locus
All I did was right click the closed Access Database file, select Copy and then Paste. It was pasted into the same directory as the original (Windows adds the "copy" notation to the copied database.
Thanks!
Rich Locus
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Compressing Database Files - Anomalies
I guess it's down to the randomness in the compact algorithm.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 165
- Joined: 03 Oct 2015, 00:30
Re: Compressing Database Files - Anomalies
The mystery of the internals :)