Why can I get the compact method to release emptied pages back to the filesystem when using the DB_FREE_SPACE flag?
If you plan to utilize the compact method with a volatile database, it is recommended that the database reside in its own file. If you have databases x,y,z in a single file and plan to compact database x and free emptied pages to the filesystem it is likely that databases y, z will prevent pages from being freed to the filesystem. If you run compact with the DB_FREE_SPACE flag, emptied pages will still be placed on the free page list, but not freed to the filesystem. To free space from the file there must be free pages at the end of the file and the other databases (y,z) may contain those pages and in particular the meta data pages from those databases can never be freed.
Related Questions
- Why can I get the compact method to release emptied pages back to the filesystem when using the DB_FREE_SPACE flag?
- What are the differences between the General Release and OEM versions of the Compact Flash drive?
- Is there any way to compact databases and return unused database pages to the filesystem?