Writing T-SQL code for the engine, not for you "more demos" by popular demand
summary
Shows live demos on SQL Server 2022 in a Docker container with SSMS 19 and a 10GB StackOverflow DB, proving concrete fixes: an implicit conversion flips an index seek to an index scan (38 logical reads), correcting data types and precision yields an ETL drop from 12 hours to 2 hours, replacing OR-joins with two queries plus UNION drops runtime from ~11s to 4s, using query-level RECOMPILE and temp tables avoids parameter sniffing and local-variable pitfalls, and inlinable scalar functions cut one query from 1m23s down to single-digit seconds.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:57Query tuning expectations
- 7:02Demo setup
- 10:22Data types in T-SQL
- 13:09Table partitioning
- 24:11Parameter sniffing
- 37:07OR to UNION rewrite
- 41:21Compatibility level
- 43:50Slow query tuning
- 48:07Scalar functions impact
- 51:39Closing
related talks
52mWriting T-SQL code for the engine, not for you "more demos" by popular demand
52mWriting T-SQL code for the engine, not for you "more demos" by popular demand
49mHidden Gems in SQL Server 2022 Database Engine
48mSQL Server 2022 hidden gems
01h 02mUnlocking the Full Potential: The Harmonious Dance of EF Core and SQL Server
09mInterview Speaker
53mBanishing Slow Queries with Intelligent Query Processing
49mPerformance Features in SQL Server and Azure SQL
