Launch week: the Season Pass & Fundamentals Week are 50% off — ends in 4d 06h 27mSee the sale

Confession Time: I Never Taught You About B-Trees.

You don't need to be able to read Japanese to know this is good for you.I work with databases for a living.

I teach people, and I help them via consulting.

And as far as I can remember, I’ve never written something about how b-trees work.

And I don’t ever expect to. Ever.

For decades, I felt really guilty about that. I kept telling myself, “Man, I’m not really teaching people about databases because I don’t explain b-trees. My most popular free class, How to Think Like the Engine, completely glosses over the whole concept of b-tree navigation, and I act like all of the magic is just within the leaf pages themselves. It’s not, and … I should probably explain the rest of the magic.”

But the rest of that magic just isn’t that important.

When I teach How to Think Like the Engine, I see all kinds of lights go on in peoples’ eyes, and they say stuff like, “Now I get it. Now I understand why column order matters in an index, and I’m starting to get what columns are supposed to go first, and why my query is scanning an index instead of seeking on it, and why key lookups have to be done.” They immediately do a better job of designing indexes to support their queries. As they’re walking away, I feel like I need to add, “Oh, by the way, there’s this thing called a b-tree, and it’s how you actually find the page you want, and … I mean it’s probably important, but… yeah sure you should go, because I gotta scope how much I can teach you in the limited time we have together.” I felt really guilty about that.

I stopped feeling guilty when I watched Adam Savage answer the first question in this YouTube video:

Why Are Guns Oversimplified in Science Series?

He said:

Science communication is about getting the idea across, not all the facts. I know that sounds weird, but sometimes the facts can get in the way of the understanding.

He goes on to explain much more, and with every sentence that he uttered, I found myself yelling, “YEAH! YEAH EXACTLY! PREACH!”

I’m telling you because I want to ease your pain, too.

Some of you out there wanna share what you’ve learned. You wanna write a tutorial or build a presentation, and you feel overwhelmed because you keep adding more and more onto the list of things you think it needs to include. You feel like you can’t explain topic A and topic E without covering B, C, and D in detail.

Your strategy is to:

  • Come up with the concept you want to teach.
  • Write your takeaway slide: the 4-6 bullet points that you want the audience to have learned during your time together.
  • Write a bio of the perfect person to attend your session. How old are they? What do they do for a living? What do they know already? What terms have they never heard before?
  • Write out the linear story you’re going to tell them, trying to keep it in a straight line as much as possible, without going off on tangents. You need to get them from what they know today, to knowing the 4-6 bullet point takeaways, taking them on as few detours as possible.

When you find yourself saying, “Oh but they really need to know C or else their project is screwed – but it would take too long!” – no problem, just add that to a resources slide that you’re going to cover at the end.

Your readers/attendees are not going to walk straight out of your session and go build a database server by hand! They’re just using your session as a starting point for their learning journey, and you’re going to be so excited and compelling that it’s going to motivate them to learn more. Your resources list at the end of the session is valuable, and the really motivated students are gonna devour that stuff on their own time.

Except for b-trees. People writing queries have no business learning that minutiae, and I’m tired of feeling guilty for avoiding that topic. And if you’re the kind of person who was kinda underwhelmed by how b-trees are mostly unrelated to the practical work of performance tuning, then check out my training classes.

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.

3 comments

  1. I totally agree. I have the same problem with the internals of a page. It feels like something you should know about but it never matters! You can read a massive chapter in a book like Kalen’s, but I have never once benefited from knowing what a slot array is or the how the engine knows which rows are ghosts.

    1. That’s my feeling about most internals stuff. It’s thrilling to learn, and I genuinely enjoy learning about it because I care about what I do, to the point of it being a hobby, but … I understand why most people don’t, and I don’t blame them at all.

  2. Completely agree, and love it when you share Adam’s videos – he’s got a great way of communicating.

    A few years ago in work i attended a session on delivering presentations. The key takeaway was it’s not about PowerPoints or fancy slides, it’s all about you and how engaging a speaker you are, and how well you can deliver a few key points.

    Fast forward a few months at a work staff conference and all but one presentation was crammed with fancy slides, a stupid number of stats and loads of detail.

    People listened, but weren’t sure what they were listening to, and why they should care. People were blown away by the presentation that simplified things as it was inclusive and enabled people to follow the thread.

    Very few people need to know all of the story, and the great story tellers know which bits to leave in and which bits to cut.

    This is perhaps why i too own one of Kalen’s internals book – Microsoft Dave made things sound so simple….

Leave a comment

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

Email me about new comments: