Hi, Brent here! I’m really excited to welcome you to Mastering Index Tuning.
Read this whole page: there’s a lot of stuff in here for you.
Watch How to Think Like the Engine and Fundamentals of Parameter Sniffing.
Before we get started, I need to make sure that we’ve covered the basics:
- How to Think Like the Engine – free 90-minute class that covers the foundations of clustered and nonclustered indexes, statistics, memory grants, and sargability.
- Fundamentals of Parameter Sniffing – 1-day class that covers what parameter sniffing is, and how to write queries that are susceptible to it.
Armed with the material in those two classes, you’ll be well-equipped to keep up in this Mastering class.
Now, get your computer ready for the webcast.
To ask questions and talk to the other attendees, go to https://www.brentozar.com/slack/ to get an instant invite, then join the #BrentOzarUnlimited channel. This way attendees can help each other with their questions during the live labs. (We don’t use the GoToWebinar Q&A or chat because you can’t see each other’s chats.)
The slide deck (2MB PDF) is here (last updated 2020-05-27) but it’s just a few slides that I use at the beginning of the class, not very useful for note-taking. The real meat is in the demo scripts in each module, and of course those are all here on the site.
If you didn’t buy a lab VM, or if you want to run the demos after the class finishes, read the scripts and databases setup.
- 0.2 How to Set Up Your Own Lab Server
- 1.0 Introductions and Recap of the Fundamentals
- 1.1 How Index Tuning Reduces the Blast Radius
- 1.2 How Query Hints Reduce the Blast Radius
- 1.3 The Drawbacks of Using Recompile Hints
- 1.4 Lab: Get One Plan to Work Well Enough for Most
- 1.5 Bad Branching Causes Sniffing, Good Branching Reduces It
- 1.6 Lab: Fixing Parameter Sniffing Problems with Branching
- 2.1 Spotting Wild Variations in the Plan Cache
- 2.2 Trending the Plan Cache Over Time
- 2.3 Lab: Track Down Sniffing in the Plan Cache History
- 2.4 Tracking Even More Plan Cache Details with Query Store
- 2.5 Lab: Track Down Sniffing Problems with Query Store
- 3.1 How Memory Grant Feedback Multiplies Parameter Sniffing
- 3.2 How Adaptive Joins Help, and How to Get ‘Em
- 3.3 Lab: Seeing the Effects of SQL Server 2019 Compat Mode
- 3.4 How Automatic Tuning Mitigates Parameter Sniffing
- 3.5 Using usp_PlanCacheAutopilot
- 3.6a Lab: Fixing the Problems You’ve Been Tracking Down This Week
- 3.6b Tuning usp_ShowPostsByDate
- 3.6c Tuning usp_RptFastestAnswers
- 3.6d Tuning usp_RptQuestionsAnsweredForUser
- Bonus: Storytelling Time