Re-Indexing / DBCC SHOWCONTIG

  • Hi, I've been using the selective re-indexing script listed in Books online under DBCC SHOWCONTIG. However, i'm not clear on one part of the script and i guess it comes from the fact that i'm not really clear on Index Depth.

    1. Can someone please explain index depth?

    2. Why does the script only re-index indexes with a depth greater than 0? (i have 18 badly fragmented indexes that have a 0 index depth.)

     

    Thanks for shedding some light on to this for me.

     

    Jim

    Regards, Jim C

  • Jim,

    index depth is basically the number of levels in an index b-tree. See also http://msdn2.microsoft.com/en-us/library/ms177443.aspx

    The reason index with a depth of 0 are excluded is that such an index would consist out of one page only and thus cannot be logically fragmented. You say you have 18 index which are badly fragmented with an depth of 0, but I think you're confusing it with the level in the Showcontig output.

    Level 0 in the output (leave level) just tells you at which Showcontig scanned the index. It's not the saem as index depth.

    Markus

     

    [font="Verdana"]Markus Bohse[/font]

  • Thank you for the clarification.

    Regards, Jim C

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply