top of page
Profile
Join date: Nov 28, 2019
Posts (66)
Jun 25, 2026 ∙ 4 min
The Curious Case of the Missing Histogram
A 7-million-row table. A clustered primary key. Auto-update statistics enabled. Yet the index statistics had never been updated, and the histogram was missing. At first, it looked like a SQL Server bug. The real explanation was much more surprising—and reveals an important detail about how the optimizer decides when a histogram is actually needed. Along the way, I'll also cover a recent enhancement to Ola Hallengren's maintenance solution inspired by this edge case.
59
0
Mar 23, 2026 ∙ 3 min
Cascading Foreign Keys: I Was Against Them… Until I Finally Understood Why
For years, I avoided cascading foreign keys without fully understanding why. Then I discovered what SQL Server really does under the hood - escalating locking behavior to guarantee consistency. Combine that with missing indexes, and a simple delete can lock entire tables. Here’s why ON DELETE CASCADE deserves more respect than we give it.
154
2
2
Mar 5, 2026 ∙ 3 min
When Statistics Stay Empty Forever: A Hidden Edge Case with Empty Tables
Many SQL Server DBAs rely on automated statistics maintenance solutions, but they might be unaware of a corner case that can cause statistics to remain empty forever.
211
0
3
Guy Glantser
Admin
More actions
bottom of page
