Types of Indexes

SQL Server uses two types of indexes: clustered and nonclustered. The primary difference between the two index types is the way the data is stored in the tables—randomly for nonclustered indexes and sorted for clustered indexes. The following sections describe each type of index and suggest where one or the other might be appropriate.

Clustered Indexes

In a clustered index, the table data is actually stored sorted on the key value(s) in the index. Some would say that all table data is stored sorted in the index; others would say that the leaf, or lowest, level of the index is actually the table. Either way you look at it, the concept of a heap no longer applies. As the table data can be physically sorted only one way, only one ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.