Forwarded Records: the Back-Pointer and the Trip Home
Note: a self-contained MCVE reproducing every result in this post is included at the end - see "The MCVE: run it yourself". Hugo Kornelis recently challenged a sentence in my post on how SQL Server…
How Much Transaction Log Does REORGANIZE Really Generate? I Measured It
A while back I published , including the classic advice: reorganize in the middle band of fragmentation, rebuild above it, because “reorganize only logs the pages it actually moves.” In a LinkedIn discussion, Jeff Moden…
The Guard Clauses Your Index Rebuild Script Needs
Writing a loop that rebuilds fragmented indexes takes about ten minutes. Writing one you can safely leave running unattended at 2 AM takes considerably longer, and the difference is entirely in the guard clauses: the…
Forwarded Records: What an UPDATE Can Do to a Heap
A heap, a table with no clustered index, has a failure mode that clustered tables do not: an UPDATE that makes a row larger can force it to physically move, and SQL Server leaves a…