Posts by Brent Ozar

Meme Week: Queue in the Database

Architecture
11 Comments
When you have a hammer, everything looks like a nail. Unfortunately, a lot of people don’t even know how to use a hammer correctly. You really shouldn’t be doing queues in the database because: They’re a blocking nightmare, constantly locking rows in highly concurrent tables They’re a logging nightmare, constantly pouring data into the transaction…
Read More

[Video] Office Hours: Q&A on the Beach at Sunset

Videos
0
You posted and voted on questions at https://pollgab.com/room/brento and I answer ’em on the beach. It’s not your eyes: the camera’s hunting for focus a lot in this video. Here’s what we covered: 00:00 Introductions 01:01 RoJo: Please comment on the Cloud. Too much push at my company to the Cloud without backing to do…
Read More

[Video] Office Hours at Sunrise (No Really)

Videos
0
I’ve got a really sensitive lens (Sigma 16mm f/1.4) on my camera, so often when I record these at sunrise, it’s already too bright for you to see the sun. This time, I went down to the beach a little earlier, and through the video, you can see the light really pick up. Here’s what…
Read More

[Video] Office Hours: Ask Me Anything About SQL Server

Videos
0
You ask questions at https://pollgab.com/room/brento and I answer ’em from the beach in Cabo San Lucas: Here’s what we covered: 00:00 Introductions 00:27 Paul: What are your thoughts on being a Microsoft MVP? 04:33 Lance: I have a Server running SCCM that gets ‘unsafe assembly’ errors. Are unsafe assemblies something that needs to be worried…
Read More
Office Hours - ask me anything.

[Video] Office Hours: Ask Me Anything About SQL Server in Cabo

Videos
4 Comments
I watched the sun rise from my balcony in Cabo this morning and answer your questions from https://pollgab.com/room/brento. Here’s what we covered: 00:00 Introductions 00:42 Student: Hi Brent! Why is full backup sometimes slow and sometimes fast in similar situations? This problem will be resolved after restarting the server but it comes back again. 02:58…
Read More

When Should You Use DESC in Indexes?

Indexing
8 Comments
The short answer is that if your query orders columns by a mix of ascending and descending order, back to back, then the index usually needs to match that same alternating order. Now, for the long answer. When you create indexes, you can either create them in ascending order – which is the default: CREATE INDEX…
Read More

[Video] Office Hours: Ask Me Anything About SQL Server

Videos
1 Comment
Let’s pick up right where we left off yesterday. I’ve got more time and champagne, so let’s keep going through your top-voted questions from PollGab.com/room/brento. Here’s what we covered: 00:00 Introductions 00:39 Wilma: Poor code & tuning issues. Evidence = Database Performance Analyzer & sp_blitz. App is the customer’s idea. The dev has got golden…
Read More
Office Hours - ask me anything.

[Video] Office Hours: Ask Me Anything About SQL Server

Videos
0
I’m back in San Diego, so let’s sit out on the balcony, enjoy a tasty beverage, and go through your top-voted questions from PollGab.com/room/brento. Here’s what we covered: 00:00 Carl: Hi Brent, what is your opinion of the graph db support starting in SQL2017? Is this another doomed SQL feature? 02:06 Bob: Brent, sometimes when…
Read More
Brent Ozar's Consultant Toolkit

Updated First Responder Kit and Consultant Toolkit for January 2022

In this release, sp_Blitz shows some information about clusters and AGs, sp_AllNightLog and sp_DatabaseRestore get some love, and more. Wanna watch me use it? Take the class. To get the new version: Download the updated FirstResponderKit.zip Azure Data Studio users with the First Responder Kit extension: ctrl/command+shift+p, First Responder Kit: Import. PowerShell users: run Install-DbaFirstResponderKit…
Read More

Error Handling Quiz Week: Tryin’ TRY/CATCH

T-SQL
32 Comments
Let’s say we have two tables, Parent and Child, and we need to guarantee that they both get populated at once. We’ll write a single stored procedure to do both inserts: DROP TABLE IF EXISTS dbo.Parent; DROP TABLE IF EXISTS dbo.Child; CREATE TABLE dbo.Parent (ID INT IDENTITY(1,1), DateAdded DATETIME2); CREATE TABLE dbo.Child (ID INT IDENTITY(1,1),…
Read More

Registration is Open Now for My SQLBits Workshop!

SQLBits
2 Comments
Registration just opened up for my SQLBits workshop on Mastering Parameter Sniffing! Move fast – due to COVID, they’re spacing out the attendees, so there are even less seats available than usual. My workshops usually sell out quickly, so if you want a seat, you’ll need to hustle in. Here’s the session abstract: You’re a…
Read More

[Video] Office Hours in Cabo: Ask Me Anything About SQL Server

Videos
3 Comments
Let’s get together at sunrise in Cabo San Lucas, Mexico and talk through your highest-upvoted questions from https://pollgab.com/room/brento. Here’s what we covered: 00:00 Introductions 00:33 AtHomeWithCOVID: Historical advice is to spread multiple datafiles/filgroups across disks. Now, storage is allocated from a balanced SAN as one drive, e.g “D” data, “L” Logs Are there any gains…
Read More
Menu