~/talk

Modern T SQL for Better Performance

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

Shows specific replacements for common slow patterns: use LAG/LEAD window functions instead of self-joins or APPLY to compare adjacent rows (700k rows runs in ~9s vs minutes for naive joins), use the ROW_NUMBER trick to detect islands and gaps, replace manual month math with EOMONTH vs date math (example: 8M rows down from 12s to 5s; 31M rows runs ~19s), prefer windowed running totals with OVER and a frame for subscription counts (scaled to 1M rows), note Adaptive Join (batch mode) flips nested loop to hash on columnstore but requires Enterprise and a columnstore index.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Agenda
  3. 2:55Cursors
  4. 4:31Stock Market Problem
  5. 5:29Stock Market Demo
  6. 10:47Lead
  7. 11:08Subscription Problem
  8. 12:13Example
  9. 29:20Learning T SQL
  10. 33:53The Solution
  11. 41:43Intelligent Query Processing
~/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.