3

Will a clustered index in SQL Server 2008 R2 create an additional B-tree structure like in case of nonclustered index, where each element of the B-tree contains value and data locator?

Or SQL server just sorts all the table by the clustered index column?

1
  • 1
    A clustered index is both a navigation structure (the B-Tree part), as well as the actual data pages at the leaf level of the navigation tree. Once you've navigated through the tree, you are directly at the corresponding data page and all the columns of the entry are available to oyu Commented May 31, 2013 at 13:53

1 Answer 1

2

Clustered Index by definition is the data and is stored with the index on disk in the order of the index itself. Instead of pointers to the data, the actual data is part of the index node.

http://msdn.microsoft.com/en-us/library/ms177443(v=sql.105).aspx

Sign up to request clarification or add additional context in comments.

1 Comment

The on disc order is not necessarily the same as the index key order. e.g. if data is inserted in the middle of the index the new pages allocated could be anywhere in the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.