Free Fundamentals of Query Tuning Week: Part 1, Building a Query Plan

Well, that escalated quickly, huh?

Just a few short months ago, we were all making plans about what we wanted to learn in 2020. We sketched out our goals, our conference plans, maybe even how we wanted to do our first user group presentations or SQL Saturday presentations.

These days:

  • The events you wanted to attend are canceled
  • Your company banned travel (either for health reasons, or budgetary ones, or both)
  • Your family isn’t too keen on you leaving, either
  • It feels like your projects are all in a holding pattern

So, what’s the rational thing to do? Start learning online instead, and I’m gonna help by giving away another class for a couple of weeks. I’ve already shared my Fundamentals of Index Tuning class for free, but now that the quarantines are amping up, let’s spend another week learning. But follow along, because on April 1, they’re going to disappear. If big countries are still quarantined through April, I’ll give away other fundamentals classes in April. Let’s get started!

To follow along with the demos, download a Stack Overflow database. I’ll be using the medium-sized 50GB StackOverflow2013 database, but if you’ve got a different one handy (either the smaller 10GB or larger 300+GB one), that’s fine too – the same concepts will still apply. If you’re on a slow desktop/laptop, feel free to use the small 10GB StackOverflow2010 database.

Attach it to any supported version of SQL Server, can be Standard, Enterprise, or Developer. (Sorry, SQL Server 2008 and Express Edition won’t cut it here.) If you want a free development or evaluation version of SQL Server, hit up SQLServerUpdates.com.

Introduction Lecture (10 minutes)

I introduce the goals of the class and show students how to use Slack for live Q&A during the class. You can skip this if you want:

Now for the training.

First Lecture (35m)

When you execute a query, SQL Server has to decide things like:

  • Which table to process first
  • Which index to use on that table
  • How to access that index (seek vs scan)
  • How many rows it will find that match your search predicates

And the more tables you have in the query, the more complex the decisions become. We’ll start with a simple two-table join, with filters on both tables, and consider the decisions that SQL Server had to make along the way.

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

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

Folks who wanna take ’em all can get my Live Class Season Pass (which is on sale this month to help with folks who suddenly can’t attend in-person conferences this year.)

I’ve got a new option, too:
recordings of the Mastering classes.

A lot of folks told me they wanted to attend the Mastering classes, but they couldn’t justify the Live Class Season Pass, even when it was marked down to $995. For the longest time, I didn’t wanna go any lower than that. I feel like $995 is a worthwhile investment into your career, and it’s a fair trade for the knowledge you gain in these courses.

The virus changed all that.

I needed an even less expensive way to let you get started learning right now, especially those of you stuck at home while your companies get their act together.

So last week, I took a day off vacation (hahaha) and put together a bundle of the Masters Class Recordings. Use coupon code ReallyBadWeek for another 10% off that price, and I’ll donate 10% of the sales to Doctors Without Borders.

Let’s make something good out of this terrible mess. And happy learning this week in the rest of the FQT series!

Demo Script

Previous Post
“Working” From Home? Watch A Bunch of Free SQL Server Videos on YouTube.
Next Post
Free Fundamentals of Query Tuning Week: Part 2, How to Find the Right Queries to Tune

21 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.

Menu
{"cart_token":"","hash":"","cart_data":""}