Losing weight for your database files

Source: Internet
Author: User
Losing weight for your database files

Losing weight for your database files


In the database design process, you often need to add or delete database objects, which leaves a lot of fragments inside the database and cannot effectively use the disk space, and the files will gradually increase. This is a bit like a file system that has been added or deleted multiple times, resulting in file fragmentation, a waste of disk space, and reduced read/write efficiency. You can use the tools provided by Access to compress the database. It will reschedule the location where the database files are stored in the disk and release the disk space, generally, the file capacity is reduced to a fraction of the original size.

Access has a built-in function to compress the database, but the increase in Access files is exaggerated. It may increase the size of files by ten times and make them bloated on your hard disk. This seems to be a common problem of Microsoft. You can open a Word file, add a few spaces, and then delete them (the actual content of the file has not changed), and save the space. You will find that it is larger than just now, for example, after a 45 k file has been changed several times, the file size becomes 49.5k → 58.5k → 68.5 k. I really don't know what to save to the file. Therefore, we have reason to doubt the effect of Access Database compression. I compiled a statistical system a year ago. It took about three months and was modified almost every day. It was compressed once in a few days. Finally, the size of the Mdb file was 20 mb, even the Mde file has more than 8 Mb, so I am happy to think that I can design large programs. This program is going to be upgraded this year, but I lost the source program (distressed), so I made up my mind to re-compile it. The function is almost unchanged. The size of the final Mdb file is only 2 MB, my day! I can't believe it! In the past, the more Access files are changed, the more files are compressed, the larger the files are. What is the logic! Also, if your Mdb file is too large, you can create a new empty database and import all the original database content to this new database. Then, let's take a look, the file must be much smaller. I did an experiment, a 240 k Mdb file, compress the database to k, create a new database, and import it all, it's only 60 k. Of course, whatever the above method is used, the Mdb file is still very loose, and Winzip can also compress it several times. Therefore, if you want to send the program girl to a friend, remember to use Winzip to compress your phone bill! (Source: Twin studio)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.