Are you sure that you really need it?
Yes, you have free space in your database but it will be used when the amount of data stored in this database will grow, so, your free space will become less. I have an article with some visualization, how free-space looks like in a kind of real-life. How Compaction works, it good to read it just to know what expect from those actions.
In short Compact, just should move all free blocks to the end of the database. It does not return this space to system, you then should do Truncate.
I don't know the way how to measure how much time it will take, it depends on many factors. But you can try run FileCompact method, with quite a small TargetFree, get ActualFree, and with the next time increase TargetFree until you reach desired.
- Log in to post comments