July 20, 2010 at 10:39 am
Hi,
I have a SQL 2005 system, and I have a small amount of disk space left which is housing my ndf files. I have queried my database today and found that my indexes are heavily fragmented. If I rebuld/reorganise my indexes will this shrink the data files and free up space, or will it simply reorganise my indexes for better performance?
Thanks for any help.
July 20, 2010 at 10:59 am
Rebuilding/reorganizing does not shrink the files, only DBCC SHRINKFILE and DBCC SHRINKDATABASE can do that. But please note that if you shrink your files down, you are actually causing fragmentation which could mean that your system performs slower.
If you are interested in a custom script that rebuilds/reorganizes indexes intelligently, check out mine: http://weblogs.sqlteam.com/tarad/archive/2009/11/03/DefragmentingRebuilding-Indexes-in-SQL-Server-2005-and-2008Again.aspx
Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
Ramblings of a DBA (My SQL Server Blog)[/url]
Subscribe to my blog
July 21, 2010 at 3:42 am
Ok, thanks for your help.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply