What is a clustered index?
a) An index where the order of the rows in the table matches the order of the index
b) An index that is stored separately from the table
c) An index used for non-primary key columns
d) An index used for full-text search
Answer:
a) An index where the order of the rows in the table matches the order of the index
Explanation:
A clustered index determines the physical order of data in a table. The rows are stored on disk in the same order as the index, which means that the table is “clustered” around the index.
Each table can have only one clustered index because the data can only be stored in one order. Clustered indexes are typically created on primary key columns because they optimize the retrieval of rows based on the primary key.
Non-clustered indexes, by contrast, store a separate index structure and do not affect the physical order of the rows in the table.