Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Index Fragmentation and Index Levels

Author  Topic 

dbthj
Posting Yak Master

143 Posts

Posted - 2010-03-01 : 17:07:41
After a weekend job to rebuild all the indexes in a database, I use sys.dm_db_index_physical_stats (DETAILED) to see how we're doing. I notice that, for the most part, for index level 0 (B-tree root) and the highest level (B-tree leaf pages), the avg_fragmentation_in_percent is either zero or fairly close to it. HOWEVER, the intermediate index levels tend to have very high avg_fragmentation_in_percent, some at 99% or 100%. This is even the case with clustered indexes. Is this to be expected? Are intermediate index levels to be ignored in this regard? If not and I rebuild again, should I expect improvement?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-01 : 19:14:22
I only look at level 0 in my custom code: 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
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -