SQL Server Interview Question #125

What is a heap in SQL Server?

Indexes & Query Performance Senior Advanced

Detailed Explanation

A heap is a table without a clustered index. Heap rows are not maintained in clustered-key order.

Heaps are not inherently wrong and can be appropriate for some staging, ETL, or transient workloads. However, production OLTP tables often benefit from a suitable clustered index. Updates to variable-length heap rows can create forwarded records, which may increase I/O for later lookups.