Wednesday, July 6, 2011

Shrink my database?

PROBLEM:
Why do I need to shrink my database?

SOLUTION:
Consider the following information when you plan to shrink a database:
  1. A shrink operation is most effective after an operation that creates lots of unused space, such as a truncate table or a drop table operation. 
  2. Most databases require some free space to be available for regular day-to-day operations. If you shrink a database repeatedly and notice that the database size grows again, this indicates that the space that was shrunk is required for regular operations. In these cases, repeatedly shrinking the database is a wasted operation. 
  3. A shrink operation does not preserve the fragmentation state of indexes in the database, and generally increases fragmentation to a degree. This is another reason not to repeatedly shrink the database. 
  4. Unless you have a specific requirement, do not set the AUTO_SHRINK database option to ON.
If you find this solution useful, you are welcome to press one of the ads in this page.. Thanks!

No comments:

Post a Comment