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…
Finding Eager Index Spools in the Plan Cache
Somewhere in your plan cache right now, there is probably a query quietly building an index every single time it runs. Not once. Every execution. It builds the index, uses it, and throws it away,…
IS DISTINCT FROM: Comparing NULLs Without the Headache
It usually shows up in a code review. Someone writes a filter that is supposed to exclude voided rows, it looks completely reasonable, and yet a tester swears that records are going missing. The query…
Performance and Operations: Measuring Instead of Arguing
This is Part 4 of the “Where Does Business Logic Live?” series. Parts and made the principled cases for the database and the application tier. Principles are where these debates start; measurements are where they…
The Case for Business Logic in Stored Procedures
This is the second post in the “Where Does Business Logic Live?” series. In I laid out the terms of the debate and split “business logic” into five different kinds of logic that behave very…