Performance Tuning

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

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!

Free, 3× a week

Get my new posts by email

Three posts a week, plus a Monday roundup of the best database news from around the web.

21 comments

  1. My first thought was “who’s on the $2 bill” when I saw the picture of you holding them…
    Somehow, I’m not surprised.
    Maybe I’ll print out a stack of these, and use them to pay off bets to developers here, who could then redeem them for dedicated, uninterrupted troubleshooting time…

  2. My first thought was “Why is there a shower head Behind Tara’s Head?”. IU could tell what it was in the second pic…

  3. First thought: Itchy and Scratchy dollars. Last thought: Itchy and Scratchy dollars. “It works like real money, but it’s…fun.”

    Isn’t the $20 the most counterfeit currency in the U.S.?

    1. HAHAHA, yeah. We had to jump through hoops to make sure these were okay with the Secret Service, too. I had no idea there were so many rules around printing fake currency. Go figure.

  4. Outstanding. Maybe you can add a $3 bill for Azure SQL, not sure what human to put on the front but maybe old Clippy has a nephew Cloudy. Put some spooler on the back.

Leave a comment

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

Email me about new comments: