Page 1 of 1

database size

Posted: Wed Feb 17, 2016 5:31 am
by vmprojects
After deleting all orders the size of the database still has the same size (approx. 56 mb) way is it not smaller after deleting all the orders?
How to make it smaller?

Re: database size

Posted: Wed Feb 17, 2016 11:43 am
by Abacre
It's a normal for all database engines. When you delete something from database the corresponding blocks are marked as deleted. They are called garbage blocks. Because when you need to add more new records to database like new clients/orders then database engine does not need to expand file size because it already has enough size. So the engine is reusing these garbage blocks for new records.

52MB does not really matter today. Because a typical photo now takes about 8MB. So it's a size of 6-7 photos.

But if you really want to get smaller size then you need to use an external database administration tool. In this tool you need to do backup database. And during backup process a garbage collection is performed. Then restore the database from its backup file. In this case database file will occupy minimal size without garbage blocks inside.

Re: database size

Posted: Thu Feb 18, 2016 7:49 am
by vmprojects

Which external database administration tool can you recommend to do the job?