Clustered index
A clustered index is a database index whose key determines the physical order of rows in a table or indexed view.
100 SQL Server Mistakes and How to Avoid Them
A clustered index is an index whose key determines the physical order of rows in a table or indexed view.
- How it is used
- Frames clustered-key selection as a database-design decision affecting storage and lookup efficiency.
- How deep it goes
- Explains B-tree levels, leaf data pages, and seek-versus-scan page reads, while deferring fuller index discussion.
- Examples
- Uses SalesOrderHeaders and an NCHAR(12) order number to show the cost of a wide clustered key.
- What you can do after
- Evaluate/understand when a clustered key supports efficient reads and why a wide primary key can be costly.
Read how 100 SQL Server Mistakes and How to Avoid Them explains clustered index →
Learn SQL in a Month of Lunches
A clustered index is a table-organizing structure that determines the physical order in which rows are stored on a storage medium.
- How it is used
- Organizes table rows physically so commonly used retrieval, filtering, and joining operations can avoid unrestricted row scans.
- How deep it goes
- Explains physical ordering, scan implications, key selection, and table identity, but does not provide clustered-index creation syntax.
- Examples
- Uses a sorted telephone book and the MySQL shipment table’s PRIMARY index to illustrate physical row organization.
- What you can do after
- Evaluate clustered-index choices by considering common query columns, primary-key joins, physical ordering, and table-wide scan costs.
Read how Learn SQL in a Month of Lunches explains clustered index →
Related concepts
- indexingkind of · Indexing is the organization or use of positions, keys, or lookup structures to identify and retrieve selected data or elements.
- nonclustered indexcontrasts with · A nonclustered index is a separate database structure that stores keys and row locators without determining a table’s physical row order.
- primary keyproduced by · A primary key is a designated column or attribute, or combination of them, that uniquely identifies each row or item in a table or data store.
- B-treeimplements · A B-tree is a balanced multiway search tree that maintains ordered keys and supports efficient searching, insertion, deletion, and sequential access.
- database tablepart of · A database table is a relational database structure that organizes records into rows and defined columns.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

