I Know a Query’s Gonna Be Bad When… #TSQL2sday
I open it up and the first thing I see is a comment with a changelog showing a long list of dates and author initials.
Oh I know, you think documentation is a good thing, but:
I open it up and the first thing I see is a comment with a changelog showing a long list of dates and author initials.
Oh I know, you think documentation is a good thing, but:
I work with databases for a living.
I teach people, and I help them via consulting.
Prefer listening to this via podcast? Good news! You can now subscribe to Office Hours on Spotify, Apple Podcasts, Podcast Index, Podcast Addict, Podchaser, and anywhere else fine podcasts are sold. One of my most favorite spots on earth is Jökulsárlón and Diamond Beach. The glacier Vatnajokull is slowly melting into the sea, and pieces…
Is your company hiring for a database position as of July 2026? Do you wanna work with the kinds of people who read this blog? Let's make a love connection.
If your company is hiring, leave a comment. The rules:
Microsoft SQL Server Management Studio 22.7 added the ability to format your T-SQL queries by right-clicking and clicking Format SQL, or by hitting control-K, control-Q on your keyboard:
You're probably not going to like the default formatting out of the box because you're the kind of person who has strong, passionate feelings and likes to argue about them on the Internet. Good news! The configurations are really flexible. Go into Tools, Options, SQL Formatter:
Iceland has some pretty famous waterfalls, from Þórufoss and Skógafoss in Game of Thrones, to Háifoss in Stranger Things, to Dettifoss in Prometheus, and more. However, probably the most-photographed one is Seljalandsfoss, partially because of its easy access from the Ring Road, and partially because of, uh, Justin Bieber's video for I'll Show You. That video is also a pretty good intro to the greatest hits of Iceland's south coast.
We're discontinuing our apps (not the First Responder Kit scripts, just the apps), which means I'm laying off Richie Rump, my developer that's worked with me for the last decade.
Calling him "my developer" doesn't do justice to Richie's role here, and he's really humble, so I wanted to lay out the top 5 reasons you should hire him.
Way back in December of 2009, Adam Machanic published a blog post (archive) in which he invited database bloggers to participate in a new monthly event he called T-SQL Tuesday. Each month, he (or a blogger he picked) proposed a topic, and on that date, we'd all publish our blog posts at the same time. It was a fun way to get a variety of opinions about a topic.
I used to run live online classes all year round, and I really miss it. I've had such a good time at conferences lately, and I feel like it's time to bring the live stuff back. Plus I don't know about you, but I have a heck of a hard time paying attention to recorded…
On a 12-hour layover in Keflavik, I pulled over my Suzuki Jimny (love these little things, and we can't buy them in the US) in some of the freshest real estate in the world and took your top-voted questions from https://pollgab.com/room/brento. This is a 360-degree video, so you can move the camera angle around with your mouse.
About ten years ago, I sketched out an idea for a different kind of SQL Server monitoring tool: one that gathered data just once per day, and gave you a short email with a specific list of actionable tasks to make a difference in health and performance. Richie Rump did an amazing job of building…
I'm at sea again, this time cruising aboard the Disney Treasure off of St. Thomas. Let's go through your top-voted questions from https://pollgab.com/room/brento.
https://www.youtube.com/watch?v=vLrcSGUx2lY
Normally when I tell people about SQL Server's optimistic concurrency isolation levels, Read Committed Snapshot Isolation (RCSI) and Snapshot Isolation (SI), I have to give them a little speech about how they need to test their queries because the results can change. Recently, though, I was working with a client who was getting the wrong query…
For T-SQL Tuesday #199, Koen Verbeeck posed an excellent question: if your company moved up to the cloud, but after migrating, had to come back on-premises, what would be the big problems?
I've had clients in this exact situation! Here are some of my favorite gotchas from those experiences.
I'm back in the home office to take another round of the top-voted questions from https://pollgab.com/room/brento.
https://www.youtube.com/watch?v=QdQiRbYr500
For T-SQL Tuesday #100, Adam Machanic's challenge for SQL bloggers was to predict what databases would be like 100 months from then.
Well, guess what: that's coming up this July!
Is your company hiring for a database position as of June 2026? Do you wanna work with the kinds of people who read this blog? Let's make a love connection.
If your company is hiring, leave a comment. The rules:
In this live stream recording, I'll show you how to use the latest features of sp_BlitzCache to rapidly improve performance on an existing server. I'll show you how to find your server's top bottleneck, find the queries causing that bottleneck, and then demonstrate how to get advice from AI on how to tune them in seconds.
You might notice that the advice you get from Copilot in SSMS isn't very good, but it isn't necessarily AI in general. Part of the problem is something specific about SSMS Copilot and the way it prompts LLMs, and I wish I could tell you exactly what it is, but I can't because I don't have access to how SSMS is changing your prompts.
You were minding your own business, and all of a sudden it happened.
You glanced at file sizes one day, and your eyes got big. The numbers got a little large while you weren't looking. This is a great time to stop and think about a few changes to the way you're managing this database.