Hi Michael,
My name is Frank Miller. Thank you for using the Microsoft Access
Newsgroups.
As I understand your question, you want to know why importing all the
objects from you ADP to a new ADP caused the size to decrease by a
significant amount.
From just the comments you posted, it isn't clear if the original ADP at 35
MB had been compacted, unless this is what you are referring to by
"compressed." Usually, once a file has been compacted it is about as small
as it can get without using some kind of compression software such as
WinZip.
When we import all objects into a new ADP container, we are effectively
compacting the database file.
Any time we delete an object in a database file, the object is not actually
removed from the file until the database is compacted. You did indicate
that you had some images, perhaps embedded in forms or reports? If you were
to delete the forms or reports that contained these images and recreated
them without the images, the space for both the old and new objects is
still being taken up until the file is compacted.
For example, I just took a new blank database file with a blank form and
embedded a 10 KB image. The database file jumped to 465 KB. After deleting
the form, the database file was slightly larger. After compacting the
database, the file size was back to about 100 KB. Depending upon the type
of image file and how and where it is inserted into the database, the
database can grow by as much as 5 MB per image which will remain even after
the object is deleted and until the compact is done.
Here is a list of the benefits of running CompactDatabase:
Note: It's highly recommended that databases are compacted often, daily if
possible.
- Reclaims disk space 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 the database is compacted.
- Reorganizes a table's pages so they reside in adjacent database pages.
This improves performance because the table data is sequential, allowing
for better use of the read ahead cache.
- Resets incrementing AutoNumber fields so the next value allocated will be
one more than the highest value in the remaining records.
- Regenerates the table statistics for the indices, which the Query
optimizer depends heavily on these for optimal query plans. These
statistics can become out-of-date over time, typically if transactions were
rolled back, or if the database was abnormally terminated.
- Flags all queries so that they will be recompiled the next time the query
is executed. This is important because database statistics can change and a
previously compiled query may have an inaccurate query plan. For example a
database may greatly increase or decrease in size.
In addition to compacting the database on a regular basis, the most current
update of JET 4.0 contains modifications to help reduce database size and
is available for download by referencing article:
Q282010 - ACC2002: Updated Version of Microsoft Jet 4.0 Available
http://support.microsoft.com/support/kb/articles/q282/0/10.asp
Q239114 - ACC2000: Updated Version of Microsoft Jet 4.0 Available
http://support.microsoft.com/support/kb/articles/q239/1/14.asp
If you compact the database, then import all objects into a new ADP
container, I would not expect to see much of a difference in the file size.
I hope this helps! If you have additional questions on this topic, please
reply to this posting.
Regards, Frank Miller
Microsoft Support
This posting is provided AS IS with no warranties, and confers no rights.
Peer-to-peer newsgroups are available to help you interact with other users
of our products including Microsoft " Most Valuable Professionals" - MVP's.
For more information please see
http://communities.microsoft.com/newsgroups/default.asp?icp=GSS&slcid=us