~/talk

Understanding Statistics in SQL Server

Talkat SQL Server Virtual Conference 2021 · on Friday, 2021-01-29· [databases]
links:none on file
slides:none on file

Explains how SQL Server uses column and index statistics to drive cardinality estimates, shows DBCC SHOW_STATISTICS output (header, density vector, histogram) and matches estimates to actual row counts in demos, and demonstrates that skewed distributions and sampling cause large plan differences: examples include a 5,295 correct estimate, a 5,437 near-miss, and queries returning 22k vs estimated 5k rows. Covers auto-create/update behavior, auto update statistics asynchronously, effects of updates on plan cache and parameter sniffing / parameter sensitivity, and using DBCC SHOW_STATISTICS to decide fixes.

AI-written summary · about

  1. 0:00Start
  2. 4:23Statistics-related Database Options
  3. 7:02Query or join on a column, get a statistic!
  4. 25:33How do we manage statistics?
  5. 26:28Updating statistics
  6. 29:30Threshold Comparison
~/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.