Free Fundamentals of Query Tuning Week: Part 2, How to Find the Right Queries to Tune

Well, it turns out that toilet paper doesn’t cure the coronavirus, so during the quarantines, I’m giving away free training. Yesterday, I kicked off the Fundamentals of Query Tuning class with the first module, building a query plan. Make sure to keep up with the series – on April 1, these posts will magically disappear.

Now that you know some of the decisions SQL Server has to make, let’s look at your SQL Server to see what kinds of decisions it’s been making lately. First, we’ll run a workload against the Stack Overflow database and use sp_BlitzCache to spot the most resource-intensive queries.

Then, you’ll take a look at your own development or production environments to get an idea of what queries you need to tune in real life.

This lab has 3 separate demo scripts:

  1. Sets up the indexes & stored procedures
  2. Runs the workload (can take tens of minutes – just let it run for at least 5-10 minutes before you move on to step 3, and you can run step 3’s queries while step 2 is still running)
  3. Analyzes your server’s bottleneck, and helps you figure out which way to sort sp_BlitzCache

If you like this, you can keep learning this year with:

But you, dear reader, are too smart to pay full price. You can score my Live Class Season Pass for $995 or the recordings of the Mastering classes for $795. Use coupon code ReallyBadWeek for another 10% off that price, and I’ll donate 10% of the sales to Doctors Without Borders.

Demo Script #1: Index & Proc Setup

Demo Script #2: Run the Workload

Demo Script #3: Finding the Right Bad Queries

Later this week, I’ll be covering how parameters influence cached plans, improving cardinality estimation accuracy, and common T-SQL anti-patterns.

Previous Post
Free Fundamentals of Query Tuning Week: Part 1, Building a Query Plan
Next Post
Free Fundamentals of Query Tuning Week: Part 3, How Parameters Influence Cached Plans

3 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.