In this lab, I give you a little freedom to choose for which level of challenge is right for you: Easiest: tune a single query. Restart your SQL Server, restore your Stack Overflow database, run the setup script below, then open mqt_Lab2_Level1 and work on tuning it. Read the stored proc’s code to learn about…
1.6 Lab 2: Analyzing a Running Workload
In this lab, I give you a little freedom to choose for which level of challenge is right for you: Easiest: tune a single query. Restart your SQL Server, restore your Stack Overflow database, run the setup script below, then open mqt_Lab2_Level1 and work on tuning it. Read the stored proc’s code to learn about...
To access this incredible, amazing content, you gotta get Live Class Season Pass, Live Class Season Pass PLUS Lab VM or Mastering Query Tuning, or log in if you already shelled out the cash.
- 0.1 Prerequisites Before the Class (59 min)
- 0.2 How to Set Up Your Own Lab Server
- 1.1 How SQL Server Builds Query Plans
- 1.2 Cardinality Estimation
- 1.3 CTEs, Temp Tables, and APPLY
- 1.4 Lab 1: Improving Estimates
- 1.5 Using sp_BlitzCache to Find the Right (Wrong) Queries
- 2.1 Tuning for SELECT * and Lots of Rows
- 2.2 User-Defined Functions
- 2.3 Lab 3: Changing Results and Parameters
- 2.4 Dynamic SQL Pro Tips
- 2.5 Lab 4: Advanced Rewrites
- 3.1 How Parallelism Balances Work Across Threads
- 3.2 Using Batches to Do a Lot of Work Without Blocking
- 3.3 Avoiding Deadlocks
- 3.4 SQL Server 2017 & 2019’s New Robots
- 4.1 Final Lab: The Setup
- 4.2 Final Lab: Index Tuning
- 4.3a Final Lab: usp_Q1080
- 4.3a Final Lab: usp_Q6627
- 4.3a Final Lab: usp_Q8116
- 4.3a Final Lab: usp_Report3
- 4.3b Final Lab: Logging sp_BlitzCache to a Table
- 4.3c Final Lab: usp_Q7521
- 4.3e Final Lab: usp_FindRelatedPosts
- 4.3f Final Lab: usp_Q6627, Take 2
- Bonus: Parameter Sniffing
- Bonus: Parameter Sniffing Lab
- Bonus: Storytelling Time