Does the cluster index and the table on which it is created contain actual data?

Clustered indexes sort and store rows of data in a table or view based on their key values.

https://msdn.microsoft.com/en-IN/library/ms190457.aspx

This means that if the table has a clustered index, then the rows of this table will be stored on disk in the same exact order as the clustered index.

Secondly, the leaf nodes of the clustered index contain the data pages of the table on which it is created.

https://technet.microsoft.com/en-us/library/ms177443%28v=sql.105%29.aspx

So my question is, are the same data stored in the cluster index and the table on which it is created?

If so, what is the need to sort the table in the same order as the clustered index? Because the clustered index itself stores row-level data in its leaf nodes.

And if not, what is the actual theory of creating a cluster index?

+4
source share
2 answers

I got the answer here: https://www.youtube.com/watch?v=lYsVOB_A5o4

https://www.simple-talk.com/sql/performance/14-sql-server-indexing-questions-you-were-too-shy-to-ask/

A clustered index is not a separate index from a table; it is a table. A clustered index is not a separate object, similar to other types of indexes, but rather a table sorting mechanism and facilitating quick access to data.

, , , . .

+1

- IS !

- IS .

+4

All Articles