June 2015
Intermediate to advanced
1800 pages
70h 6m
English
What happens when rows are deleted from a table? How, and when, does SQL Server reclaim the space when data is removed from a table?
In a heap table, SQL Server does not automatically compress the space on a page when a row is removed; that is, the rows are not all moved up to the beginning of the page to keep all free space at the end. To optimize performance, SQL Server holds off on compacting the rows until the page needs contiguous space for storing a new row.
Because the data pages of a clustered table are actually the leaf pages of the clustered index, the behavior of data row deletes on a clustered table is the same as row deletions from an index page.
When rows are ...
Read now
Unlock full access