You are hereSQL Server 2005 DBA / Reasons why not to shrink DB data files

Reasons why not to shrink DB data files


By sqlguychuck - Posted on 10 August 2009

No votes yet

Paul Randal gives an excellent explanation of why not to shrink data files if you don't have to. http://www.sqlskills.com/BLOGS/PAUL/post/Why-you-should-not-shrink-your-data-files.aspx You can turn a <1% fragmented index to 99% fragmented index with one shrink operation.

His recommendation, if you have the extra space, is to shrink by moving data to new filegroups:

• Create a new filegroup
• Move all affected tables and indexes into the new filegroup using the CREATE INDEX ... WITH (DROP_EXISTING) ON <filegroup> syntax, to move the tables and remove fragmentation from them at the same time
• Drop the old filegroup that you were going to shrink anyway (or shrink it way down if its the primary filegroup)

-SQLGuyChuck

Rate This

No votes yet