# Data Structures in SQL Server: Heap, Clustered Index, and Non-Clustered Index > [!Note] > `SQL Server provides three fundamental storage structures—heaps, clustered indexes, and non-clustered indexes—to organize and access table data efficiently.` A [[Heap]] is a storage structure that contains all table columns without any guaranteed order. Data pages in a heap are linked via an IAM (Index Allocation Map) but are not sorted on any key. Heaps are simple to maintain but require full table scans for many queries, making them less efficient when selective data retrieval is needed. A [[Clustered Index]] physically orders the data rows in the table based on a specified **clustering key**. Each leaf-level page of the [[Clustered Index]] holds the actual table data in sorted order, which enables efficient range scans and ordered retrieval. Because there can be only one [[Clustered Index]] per table, choosing an appropriate clustering key is critical for performance. A [[Non-Clustered Index]] creates a separate B-tree structure that stores only the indexed columns and row locators (either clustering keys or RID pointers for heaps). [[Non-Clustered Index]] allow rapid lookups on secondary columns without affecting the physical order of the base table. They are especially useful for highly selective queries but incur additional storage and maintenance overhead. --- ## References - Korotkevitch, D. (2022). _SQL Server advanced troubleshooting and performance tuning: Best practices and techniques_. O’Reilly Media. - Nevarez, B. (2022). _SQL Server query tuning and optimization: Optimize Microsoft SQL Server 2022 queries and applications_. Packt Publishing.