Skip to Content
Microsoft® SQL Server 2012 Unleashed
book

Microsoft® SQL Server 2012 Unleashed

by Ray Rankins, Paul T. Bertucci, Chris Gallelli, Alex T. Silverstein
December 2013
Intermediate to advanced
1872 pages
153h 31m
English
Sams
Content preview from Microsoft® SQL Server 2012 Unleashed

Deleting Rows

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?

Deleting Rows from a Heap

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.

Deleting Rows from an Index

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® SQL Server 2008 R2 Unleashed

Microsoft® SQL Server 2008 R2 Unleashed

Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Inside Microsoft® SQL Server® 2008: T-SQL Programming

Inside Microsoft® SQL Server® 2008: T-SQL Programming

Dejan Sarka Itzik Ben-Gan Greg Low, Roger Wolter, Ed Katibah, and Isaac Kunen

Publisher Resources

ISBN: 9780133408539Purchase book