Posts by Brent Ozar

Join Me at the PASS Data Community Summit in November!

#SQLPass
4 Comments
On November 4 in Seattle, I’m presenting a new pre-conference workshop! Tuning T-SQL for SQL Server 2019 and 2022 You’ve been working with SQL Server for a few years, and you’re comfortable writing queries and reading execution plans. Your company is now using SQL Server 2019 or 2022 in production, and you want your queries…
Read More

[Video] Database Answers in Hong Kong

Videos
1 Comment
As my time in Hong Kong came to an end, I sat inside on a foggy morning and hit your top-voted questions from https://pollgab.com/room/brento. Office Hours: Database Answers from Hong KongWatch this video on YouTube Here’s what we covered: 00:00 Start 01:32 MyTeaGotCold: Are there any signs of brain drain from SQL Server to Postgres?…
Read More

[Video] Office Hours: Hong Kong Harbor

Videos
2 Comments
I recently went to Shanghai & Hong Kong, and stopped to take your questions from https://pollgab.com/room/brento while sitting next to the Hong Kong harbor. Office Hours: Database Questions in Hong KongWatch this video on YouTube Here’s what we covered: 00:00 Start 01:18 Jason G – RN & Accidental DBA: Would you elaborate on DB Owner…
Read More

[Video] Office Hours: Career & Data Q&A

Videos
2 Comments
A few career and security questions found their way into the queue at https://pollgab.com/room/brento for this episode: Office Hours: Ask Me Anything About Databases and CareersWatch this video on YouTube Here’s what we covered: 00:00 Start 02:10 Ethan: What percent of your constant care shops require encryption to connect with SQL server? What are your…
Read More

Your Teammates Need the Fundamentals.

Conferences and Classes
0
You’ve been reading my site for a while, watching videos, keeping up with the best SQL Server techniques. However, you’ve got a lot of other folks on your team who don’t have as much free time as you, or they’re just getting started on their SQL Server performance tuning journey. Forward this post to them,…
Read More

Using ChatGPT for T-SQL Code Reviews

T-SQL
23 Comments
For this month’s T-SQL Tuesday, Pinal Dave asked us if AI has helped us with our SQL Server jobs. For me, there’s been one instant, clear win: code reviews. I usually keep a browser tab open with ChatGPT 4, and I paste this in as a starting point: You are an experienced, diligent database developer…
Read More

[Video] Office Hours: Just Three Questions

Videos
3 Comments
Sometimes y’all post questions at https://pollgab.com/room/brento that require extended answers. Today, I’m hitting just 3 questions: Office Hours: Just Three QuestionsWatch this video on YouTube Here’s what we covered: 00:00 Start 00:44 MyTeaGotCold: If storage is no issue, do I need to worry about the size of Query Store? It’s going to hit 10% of…
Read More

Announcing Fundamentals Week, May 6-10

Conferences and Classes
3 Comments
You’ve attended some of my free online streams, read my blog posts, and you use the First Responder Kit. You enjoy my laid-back, humorous approach to sharing what I’ve learned over the years. You love live classes. You’ve tried watching recordings or stepping through demos yourself, but…you just can’t block out the time, and you…
Read More
How to Think Like the SQL Server Engine

Tomorrow’s the Big Day: Free Live Webcasts!

Conferences and Classes
0
No fooling here. Tomorrow, I’m teaching my very favorite class live online, for free, two different ways – one with all slides, and one with all demos. Whatever way you like to learn, I’ve got you covered. So, what’s the subject? You’re comfortable writing queries to get the data you need. But you’re uncomfortable if someone…
Read More

[Video] Office Hours: 25 Answers in 10 Minutes

Videos
1 Comment
It’s time for a speed round, a rapid-fire tour of your top-voted questions from https://pollgab.com/room/brento: Office Hours: 25 Answers in 10 MinutesWatch this video on YouTube Here’s what we discussed: 00:00 Start 00:17 SteveTV: Hi Brent! Are there solutions for managing SQL Agent jobs that obviate the need for manual updates and write access to…
Read More

[Video] Office Hours: The Long One

Videos
2 Comments
You posted a lot of great questions at https://pollgab.com/room/brento and I spent almost an hour covering these: Office Hours: The Long OneWatch this video on YouTube Here’s what we covered: 00:00 Start 02:05 Kulstad: I’m using Ola Hallengren’s maintenance scripts for my db maintenance on Saturday evenings, and I’ve noticed my memory consumption go from…
Read More

[Video] Office Hours in Snowy Telluride, Colorado

Videos
0
On a beautiful sunny afternoon in the mountains, I went through your top-voted questions from https://pollgab.com/room/brento. Audio is a little rough on this one because I used a new wireless microphone and forgot to put the wind shield on it. If you’d like to watch the spatial video version on an Apple Vision Pro or…
Read More

Does Your GROUP BY Order Matter?

Execution Plans
5 Comments
Sometimes when you do GROUP BY, the order of the columns does matter. For example, these two SELECT queries produce different results: Transact-SQL CREATE INDEX Location_DisplayName ON dbo.Users(Location, DisplayName); SELECT TOP 100 Location, DisplayName, COUNT(*) AS Duplicates FROM dbo.Users GROUP BY Location, DisplayName ORDER BY Location, DisplayName; SELECT TOP 100 DisplayName, Location, COUNT(*) AS Duplicates…
Read More