~/talk

The Most Important Performance Factor in SQL Server and Azure SQL

Talkat SQLBits 2023 · 2023-03-14..03-18· [databases]
linkedin:glantser
slides:none on file

Central claim: query performance hinges on accurate statistics, not indexes alone. Demo shows missing stats cause SQL Server to use a square‑root default distinct count and a tiny sample (0.7%), producing wrong row estimates and plans that turn a 31k logical‑read query into ~800k or force 5 million key lookups. Key facts: histograms cap at 200 histogram steps, auto‑update threshold changes from 20% (pre‑2016) to sqrt(rows1000) (~200k for 41M rows), unknown values trigger a 30% inequality guess*, indexes create full‑scan stats, and SQL Server 2014+ rewrites the cardinality estimator.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 2:07Importance of statistics
  3. 5:41Troubleshooting execution plans
  4. 10:47Auto-create statistics
  5. 13:39Metadata and histograms
  6. 18:31Index-based statistics
  7. 23:45Performance testing tips
  8. 27:18Local variable issues
  9. 33:45Column correlation and CE
  10. 37:38Advanced statistics types
  11. 41:21Filtered statistics
  12. 44:50Managing statistics updates
  13. 50:02Summary and best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.