~/talk

Writing T-SQL code for the engine, not for you "more demos" by popular demand

Talkat SQLBits 2019 · 2019-02-27..03-02· [databases]
links:none on file
slides:none on file

Demos run on a SQL Server 2022 Docker container (Developer Edition) and SSMS 19 against a ~10GB Stack Overflow DB, showing concrete fixes: implicit conversions turn expected seeks into full index scans; changing partition column precision yields partition elimination and cuts an ETL from ~12 hours to ~2 hours (≈85%); OPTION (RECOMPILE) forces appropriate plans but local variables defeat parameter sniffing unless values go via a temp table; rewriting OR-joins into separate queries with UNION halves runtime; scalar functions require null-shortcircuiting or inlining to avoid huge row-by-row cost.

AI-written summary · about

  1. 0:00Introduction
  2. 1:57Query tuning expectations
  3. 7:02Demo setup
  4. 10:22Data types in T-SQL
  5. 13:09Table partitioning
  6. 24:11Parameter sniffing
  7. 37:07OR to UNION rewrite
  8. 41:21Compatibility level
  9. 43:50Slow query tuning
  10. 48:07Scalar functions impact
  11. 51:39Closing
~/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.