intermediate~2h
SQL Tuning Fundamentals
The methodology behind tuning: where to actually look first, how statistics feed the optimizer's decisions, and the ideas of selectivity and cardinality that explain why the same table gets different plans for different queries.
Learning objectives
- Apply the 90/10 rule to prioritize which queries are worth tuning first
- Explain what optimizer statistics are and why stale statistics cause bad plans
- Define selectivity as a fraction and cardinality as a row-count estimate, and connect the two
- Distinguish access predicates from filter predicates
- Explain how selectivity estimates drive the optimizer's choice between an index and a full scan
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
SQL Tuning Fundamentals