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.
Composite Index Without the Leading Key: Seek, Scan and Residual Filters
A composite index orders rows by its leading key before the next key. Compare a date-only filter, region restrictions and an isolated date-first index. Verify complete results, including new regions and NULL, before interpreting actual plans.
Prefix Searches: LIKE, LEFT and CHARINDEX
LIKE, LEFT and CHARINDEX can match the same prefix through different access paths. Compare complete matching rows and measured plans, then test literal wildcard characters and collation before choosing a search expression.
Pre-Aggregating Data for Fast Dashboards
Pre-aggregating data can make dashboards fast through summary tables or indexed views when grain, refresh, and reader consistency are clear.
Finding the Slowest Statement Inside a Stored Procedure
Find the slowest statement inside a stored procedure using query stats offsets, CPU and read totals, then confirm with Query Store.







