Mastering Query Tuning
You need to speed up a SQL Server app, and you’re allowed to change the queries and indexes – but not the server hardware or settings. Good news – I’ll teach you how in 3 days of learning and fun. Join me, Brent Ozar, as I explain how to make your SQL Server apps go faster.
Labs & lectures include:
- How SQL Server builds query plans
- How to find the queries you need to focus on first so end users will notice an improvement
- How to choose between CTEs, temp tables, and APPLY
- How to tune for SELECT * and lots of rows
- How to write dynamic SQL that scales
- How to avoid pitfalls like deadlocks and bad batching
- How SQL Server 2017 & 2019’s new robots help (and hurt)
Your Progress So Far in This Class
This is driven by the mark-as-complete buttons in each module of the class. (Let’s be honest: you’re probably just going to mark them as complete because you’re that kind of student. I feel you.)
[wpc_progress_graph course=”Mastering Query Tuning”]
Recent Updates & Changes
2025-11-16:
- The Architect and the Builder – updated and expanded all of these modules using SQL Server 2025.
- Dynamic SQL – updated, expanded, and broke into two modules to elaborate on more stuff with SQL Server 2025.
- Avoiding Deadlocks by Modifying T-SQL – added a new video to demo SQL Server 2025’s new Optimized Locking.
- Lab setup intro videos – re-recorded with logistical updates, but no need for you to re-watch those if you’ve already done the labs, and the labs themselves didn’t change.
2025-11-12:
- Tuning for Select Star and Lots of Rows – re-recorded with SQL Server 2025 just to show & explain that 2025’s PSPO and OPPO don’t fix the problem we’re addressing.
Introductions
Click on the modules on the right side of the page to keep moving through the class.