Autoplay
Autocomplete
Previous Lecture
Complete and continue
Mastering Query Tuning
Before the Class
Prerequisites
Introductions and Overview (9:08)
Download the Slide Decks
Change Log for This Class
How Early & Late Estimates Go Wrong
Explaining How SQL Server Calculates Early Estimates (46:16)
Explaining How SQL Server Calculates Late Estimates (28:03)
How to Write Fast, Safe Dynamic SQL (58:07)
Lab 1 Setup - Improving Estimates (4:00)
Lab 1 - Brent Does It (52:19)
Query Hints and Rewrites
My Favorite Query Hints (49:14)
Using Option Recompile Safely (24:13)
How to Tune for Select Star or Lots of Rows (33:31)
Why You Gotta Rewrite Most User-Defined Functions (18:50)
Lab 2 Setup - Advanced Rewrites (3:26)
Lab 2 - Brent Does It (48:27)
Finding and Fixing Blocking
How NOLOCK Makes Queries Faster (14:14)
Finding and Fixing Blocking (29:39)
Finding and Fixing Deadlocks (20:36)
Using Batches to Avoid Blocking (29:41)
Lab 3 Setup - Reducing Blocking (2:46)
Lab 3 - Brent Does It (61:13)
How the Engine Itself Tunes Queries These Days
How Parallelism Balances Work Across Threads (36:40)
How Feedback and Adaptive Features Try to Help (32:36)
AI: The Elephant in the Room (26:31)
Recap (18:09)
The Final Lab
Lab 4 Setup (2:11)
Tuning usp_SearchUsers and usp_SiteStatsHeader (36:50)
Tuning usp_TopCommentersInLocation, usp_UserLogin, and usp_TopNetVoters (36:07)
Tuning usp_AcceptAnswer, usp_PostsByLocationAndDate, and Indexes (36:39)
Bonuses
Fixing Unbalanced Parallelism: A Live Surprise (29:02)
The Ascending Key Problem (46:39)
Lab 3 - Brent Does It
Lecture content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock