Keyset paging continues after a saved ordering key instead of counting past an offset. A date and unique ID together keep equal-date rows in the sequence. A guarded disposable fixture makes the boundary conditions explicit.
Row Goals: Why TOP and EXISTS Change the Plan
Inspect row goals from TOP and EXISTS, read EstimateRowsWithoutRowGoal, and compare a targeted optimizer hint using actual plans.
Estimated and Actual Execution Plans
Estimated and actual execution plans answer different questions; compare compiled choices with runtime rows, warnings, and resource use.
What Is Compatibility Level in SQL Server?
Compatibility level in SQL Server is a per-database setting, and upgrading the server does not change it. Why a restored database keeps the old level, what the setting really controls, and how to raise it without breaking a report.
Aggregate Before the Join: Shrinking Rows Early With GROUP BY
Aggregate before the join only when the grouping preserves the required customer result. This private lab checks NULLs, missing matches, duplicate dimensions, complete outputs, actual plans, and reads.
Correlated Columns and Multi-Column Statistics in SQL Server
Investigate multi-column statistics with correlated city and state values, density vectors, and plans before expecting better estimates.
What Is Locking and Blocking in SQL Server?
Locking and blocking are not the same thing, and the difference is the whole subject. I blocked a session on purpose and read it from the DMVs. Why short blocking is healthy, and why NOLOCK fixes nothing.







