A clusteredindex is a special type of index in SQL Server that physically orders the data in a table. A non-clustered index is an index that does not physically order the data in a table, but instead stores a pointer to the data in the clustered index.
In SQL Server, each table can have only one clustered index. The clustered index is used to physically order the data in the table, and all queries against the table are executed against the clustered index.
A non-clustered index can be created on any column or set of columns in a table. Non-clustered indexes are used to improve the performance of queries that are frequently executed against a specific column or set of columns.
The main difference between a clustered index and a non-clustered index is that a clustered index physically orders the data in a table, while a non-clustered index does not.
Here is a table that summarizes the differences between clustered indexes and non-clustered indexes:
Feature
Clustered Index
Non-Clustered Index
Number per table
1
Unlimited
Physical order of data
Yes
No
Used for queries
Yes
Yes, for queries on the indexed columns
Storage
Leaf nodes contain the actual data
Leaf nodes contain a pointer to the data in the clustered index
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
A clustered index is a special type of index in SQL Server that physically orders the data in a table. A non-clustered index is an index that does not physically order the data in a table, but instead stores a pointer to the data in the clustered index.
In SQL Server, each table can have only one clustered index. The clustered index is used to physically order the data in the table, and all queries against the table are executed against the clustered index.
A non-clustered index can be created on any column or set of columns in a table. Non-clustered indexes are used to improve the performance of queries that are frequently executed against a specific column or set of columns.
The main difference between a clustered index and a non-clustered index is that a clustered index physically orders the data in a table, while a non-clustered index does not.
Here is a table that summarizes the differences between clustered indexes and non-clustered indexes: