Search

Monday, June 13, 2011

What is clustered index and non-clustered index


SQL Server supports two types of indexes: clustered index and non-clustered index. Here are the main differences between them:

* One table can only have only one clustered index.
But one Table can have many non clustered index.

* No separate space is required for clustered index. It forces the data to be stored on the index key.
But separate space is required for non clustered index.

* The default index created as part of the primary key column is a clustered index.

* A table with a clustered index is called clustered table. Its rows are stored in a B-Tree structure sorted.
A table without any clustered indexes is called non-clustered table. Its rows are stored in heap structure unsorted.

No comments:

Post a Comment