~/talk

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

Talkat SQLBits 2022 · 2022-03-08..03-12· [databases]
links:none on file
slides:none on file

Live demos run on a SQL Server 2022 container with SSMS 19 and a 10GB StackOverflow DB; concrete fixes include eliminating implicit conversions (Unicode vs varchar) to change an index scan to a seek, matching datetime2 precision so partition elimination actually excludes partitions, and using OPTION (RECOMPILE) or temp tables instead of local variables to avoid bad parameter-sniffing plans. Rewriting OR-joins into two queries with UNION avoids table spools. One reported ETL drops from 12 hours to 2 hours (≈85% improvement).

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.