~/talk

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

Talkat NDC London 2026 · 2026-01-26..01-30· [databases]
slides:none on file

Live demos extract wait stats from SQL Server, show a parallel query eating CPU but producing only 75s of useful work while CXPACKET waste = 389s wasted, and demonstrate that forcing down parallelism (MAXDOP) makes the same job take 29s → 31s yet frees 15 CPUs so capacity rises (max degree 1: 29s→31s but frees 15 CPUs). Scripts, execution plans and a Python batch prove CPU context switching and memory grant/resource_semaphore issues (7 of 10 batches delayed ~89s), and clearing wait stats isolates problem sources fast.

AI-written summary · about

  1. 0:00Introduction to wait stats
  2. 5:42Understanding query states
  3. 10:55CPU and parallelism issues
  4. 18:05Demo: Parallelism and MAXDOP
  5. 24:17Optimizing parallel queries
  6. 34:42Resource issues and bottlenecks
  7. 42:38Deep dive into resource semaphores
  8. 50:05Conclusion and Q&A
~/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.