Read more: http://www.blogsmonetize.com/2010/10/how-to-use-syntax-highlighter-3083-in.html#ixzz1DHzvEgBA

Monday, February 7, 2011

SQL Server Non-Clustered Index structure details


The non-clustered index key structure would be as follows:



Case 1: If a table has a unique clustered index index and non-unique non-clusterd index index



then its root level will have non-clustered key + clustered key



And at leaf level, non-clustered key + clustered key



Case 2: If a table has a unique clustered index index and unique non-clusterd index index



then my root level will have non-clustered key



And at leaf level, non-clustered key + clustered key



Case 3: If a table has a non-unique clustered index index and non-unique non-clusterd index index



then its root level will have non-clustered key + clustered key + Uniquifier



And at leaf level, non-clustered key + clustered key + Uniquifier.



Case 4: If a table has non-unique clustered index index and unique non-clusterd index index



then its root level will have non-clustered key



And at leaf level, non-clustered key + clustered key +Uniquifier.

The below snapshot explains the same as above:






 

No comments: