Writing T-SQL code for the engine, not for you "more demos" by popular demand
summary
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
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
49mHidden Gems in SQL Server 2022 Database Engine
01h 02mUnlocking the Full Potential: The Harmonious Dance of EF Core and SQL Server
09mInterview Speaker
48mSQL Server 2022 hidden gems
49mPerformance Features in SQL Server and Azure SQL
