Question
What is the difference between clustered and non-clustered indexes, and how does this relate to simple and compound indexing?
Asked by: USER4958
125 Viewed
125 Answers
Answer (125)
Clustered indexes determine the physical order of data in the table (only one clustered index per table is allowed). Non-clustered indexes are separate structures that point to the data rows. Both simple and compound indexes can be either clustered or non-clustered. A clustered compound index physically sorts the table based on the combined values of the indexed columns. A non-clustered compound index creates a separate index structure with pointers to the data rows, sorted by the combined values of the indexed columns.