Clustered Index
A clustered index physically stores data rows sorted by the index key; each table has only one, and non-key columns are stored alongside.
Purpose
To understand how physical data organization affects query performance and choose an appropriate clustering key.
Mechanism
Clustered index leaves are the data pages (the index is the data), physically sorted by key. Range queries on the clustering key read sequentially. Non-clustered indexes point to the clustering key rather than the row location. In MySQL InnoDB the primary key is the clustered index.
Use cases
- Physical data organization
- Primary key design
- Range query optimization