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 indexes
  2. Microsoft Learn — clustered index architecture