October 18, 2007 at 6:18 pm
You could also look at dropping the fill factor somewhat on the indexes that get very fragmented. That's what that's for (allowing for some internal rearranging without a page split).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
October 18, 2007 at 11:50 pm
Could you tell me how do I do that? or at least give me a start point. 🙂
Thanks
October 19, 2007 at 2:40 am
Susan S (10/18/2007)
Could you tell me how do I do that? or at least give me a start point. 🙂Thanks
Hi Susan,
you can do what Matt suggested with a statement like:
ALTER INDEX myIndexOnMyTable ON myTable REBUILD WITH ( FILLFACTOR = 50 )
The details are described in http://msdn2.microsoft.com/en-us/library/ms188388.aspx
Regards,
Andras
October 19, 2007 at 11:28 am
Also, if you're having continuous problems with fragmentation, you might want to see if you can change your index keys so that the indexes aren't so prone to fragmentation. E.g. move to a monotonically increasing identity value, avoid GUIDs generated with NEWID(), avoid updating variable length rows to be longer then when they were inserted, etc
Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply