API performance Level 1 This level · 7 of 10
Medium sql database

What is a clustered index?

A clustered index sorts and stores the table’s data rows according to its key. Its leaf level contains the table data itself. A table can have only one clustered index because its data rows can be stored in only one order. Without one, its rows are stored in an unordered structure called a heap.

SQL Server implements rowstore indexes as B+ trees, while its documentation uses the general term “B-tree” for indexes.

Sources (2)
  1. Microsoft Learn — clustered and nonclustered indexeslearn.microsoft.com
  2. Microsoft Learn — clustered index architecturelearn.microsoft.com
Previous
Next