What Is Estimated Subtree Cost? Query Bucks. No, Really.

Execution Plans

When you look at a query plan, SQL Server shows a tooltip with an Estimated Subtree Cost:

Estimated Subtree Cost
Now I can run all the bad queries I want!

A long time ago in a galaxy far, far away, it meant the number of seconds it would take to run on one guy’s Dell desktop. These days, it’s just a set of hard-coded cost estimates around CPU & IO work requirements – it isn’t really tied to time at all.

One day when @Kendra_Little needed to explain the unit of measurement, she coined the term Query Bucks. That’s a great example of how she really brings SQL Server concepts to life in fun ways. (You should check out her training. Her classes are completely free right now, and I absolutely guarantee you’ll learn something from them. She’s one of the smartest people I’ve ever met.)

So this year for our PASS Summit pre-con on performance tuning, we thought it’d be fun to make Query Bucks a real, physical thing. Eric Larsen brought them to life – he’s the amazing illustrator who does all of our portraits, the operators at PasteThePlan, our Christmas cards, you name it. He’s super talented and really delivered:

Kendra’s $5 Query Buck

We immortalized Kendra on her own query buck, plus one for each member of our team, then picked a couple of folks that have influenced our own query tuning careers: Paul White (@SQL_Kiwi) and Joe Sack (MrJoeSack). I am totally going to make the phrase “a stack of Paul Whites” a thing.

Joe Sack’s Query Buck
I am totally going to make the phrase “a stack of Paul Whites” a thing
Tara Kizer
Erik Darling
Richie Rump
Me (because either a $2 or $3 bill makes sense for my goofiness)

For the back, the person on the front picked their favorite query plan operator:

In Codd We Trust

I’m tickled pink with how these turned out. This might be my favorite tangible thing that we’ve ever given away – and of course, attendees of our PASS Summit pre-con today all get a handful of Query Bucks. When they get back to the office, I fully expect them to be tipping their fellow DBAs and developers for jobs well done.

Print your own with the Query Bucks PDF. Enjoy!

Previous Post
Announcing my new Mastering class series – and registration opens Wednesday.
Next Post
How to Get Live Query Plans with sp_BlitzWho

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