Problem Statement
What is the defining property of a clustered index?
Explanation
A clustered index defines the physical order of rows on disk. The table and the index are the same structure, so range scans on the key are very fast.
Because the table can be ordered only one way, you can have only one clustered index per table.
Code Solution
SolutionRead Only
CREATE TABLE orders ( order_id BIGINT PRIMARY KEY, -- often clustered by default order_date DATE, customer_id BIGINT );
Practice Sets
This question appears in the following practice sets:
