December 2017
Intermediate to advanced
434 pages
10h 14m
English
Heap is a table that has no indexes. Keep in mind that primary key or unique constraints are implemented by B-tree indexes internally, so pure heap is a very rare case of relational data table.
Data pages in heap do not have any particular order, they are not connected by offsets to each other, and records can be placed anywhere in the heap. When SQL Server does tasks over heap, it always need to scan all data pages to retrieve desired ones and work with them.
When SQL Server is inserting a new record into heap, it finds the first data page with sufficient space for the new record and places the inserted record there.
When SQL Server is updating some existing record, two situations can occur:
Read now
Unlock full access