Replace hard-coded years with indexed date ranges for current periods, full months, year-to-date comparisons, and any requested year.
Why One Query Has Two Cached Plans: SET Options and plan_attributes
Investigate two cached plans with plan_attributes, decode differing SET options, and match application settings before diagnosing skew.
Trigger Overhead: Measuring the Hidden Cost of DML Triggers
Measure trigger overhead with controlled inserts, execution plans, and cached trigger statistics before moving slow work into a queue.
Filtering on Dates Without Losing the Index
Filtering on dates without losing an index means using searchable ranges; learn half-open boundaries, date and datetime differences, and plan checks.
Reading the Warnings in an Execution Plan
Warnings in an execution plan can reveal conversions, missing statistics, and spills; read each warning in workload context.
Explaining a Query Plan to a Developer
Explaining a query plan starts with the costly work, checks estimates against actual rows, and turns findings into a clear code decision.
SQL SERVER – Actual Execution Plan vs. Estimated Execution Plan
Actual Execution Plan or Estimated Execution Plan? I always use the actual plan because it is accurate. Shortcuts: CTRL+M for actual, CTRL+L for estimated.







