~/talk

"Run Query Run" - A Fresh Look at SQL Wait Stats

Talkat NDC Oslo 2025 · 2025-05-19..05-23· [databases]
slides:none on file

Demonstrations show wait stats point to real bottlenecks: a heavy insert spends write log = 14s of 30s (≈44%) when data and log share a slow drive; moving log to a fast drive drops log waits to near zero but exposes PAGEIOLATCH/PAGELATCH = ~11–17s; parallelism tests show CXPACKET waste goes from 291s at 20 threads to 168s at 10 and 64s at 4, with fastest runtime at MPP=4; scripts (SQLAuthority URL) find overindexed tables (LCK_M_IS) and missing/unused indexes; NOLOCK shows dirty reads during long inserts.

AI-written summary · about

  1. 0:00Introduction to wait stats
  2. 2:50Query execution life cycle
  3. 5:36Interactive SQL quiz
  4. 8:15Using diagnostic scripts
  5. 13:30Disk performance demonstration
  6. 26:25Parallelism and CPU tuning
  7. 43:31Advanced SQL troubleshooting
  8. 51:31Index analysis and conclusion
~/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.