Q25: What is the difference between Clustered and Non-Clustered Indexes?
- Clustered Index: Determines the physical storage order of data rows on disk. Because rows can only be ordered one way, a table can have only one Clustered Index (typically assigned to the Primary Key).
- Non-Clustered Index: A secondary structure stored separately from data rows. It contains indexed column keys and pointers (row IDs or clustered key values) that reference the underlying table rows.
Key Takeaways
Clustered indexes physically organize table rows on disk; a table can have only one.
Non-clustered indexes store column keys with pointers back to table data pages.