Writing T-SQL code for the engine, not for you "more demos" by popular demand
summary
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
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
01h 02mUnlocking the Full Potential: The Harmonious Dance of EF Core and SQL Server
53mBanishing Slow Queries with Intelligent Query Processing
48mSQL Server 2022 hidden gems
54mLessons learned from refactoring multi terabyte databases for the last 10 years
09mInterview Speaker
