Playbooks
What do I do, and what does each option cost?
- 1
Diagnose a bad plan
A query got a bad execution plan: check estimated against actual rows first, then statistics, correlation, subqueries, the number of joined tables and pushdown, and only then the cost settings.
Diagnose - 2
Find why a query reads so much
A query reads far more data than its result needs: check that the filter reaches the scan on a clustered column, that it is not negative, that runtime filters, projection and Top-N apply, before making execution faster.
Diagnose - 3
Speed up a reasonable plan
A query has a sensible plan and reads only what it needs, but is still too slow or too frequent: reuse the answer, reuse the plan, adapt at runtime, compile, or cache a shared subplan, in order of payoff.
Diagnose