Is MERGE really slow, or did the rewrite just run on a quiet night? Here is a fair test you can run yourself.
SAMPLED vs DETAILED: Running index_physical_stats Safely
A misspelled table name quietly turns into a scan of everything. Here is the guard, and a fair comparison of the three scan modes on one small index.
Time Ago Labels: Showing ‘5 Minutes Ago’ From a Timestamp
Learn time ago labels in SQL Server with practical examples, clear checks, common traps, and guidance for your own database.
SARGable Date Filters: Stop Wrapping Columns in Functions
Write SARGable date filters as half-open ranges for years, months, days, and rolling windows, then compare plans and logical reads.
INNER HASH JOIN: Why a Table Join Hint Also Fixes Join Order
A join hint in the FROM clause quietly fixes the join order. I show the warning, three plans side by side, and the softer query-level alternative.
What Is a Cursor in SQL Server, and When to Avoid One
A cursor in SQL Server took 260 milliseconds where one SELECT took 4. Why the gap exists, how to turn a loop back into a set, and the three cases where a cursor really is the right answer.
Upcoming Birthdays in the Next 30 Days With T-SQL
Find upcoming birthdays with T-SQL across year boundaries, choose a February 29 policy, and build a clear next-30-days list.







