December 2013
Intermediate to advanced
1872 pages
153h 31m
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, as SQL Server did in versions prior to 7.0. 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 ...