Posts by Brent Ozar

Office Hours - ask me anything.

Upcoming Office Hours: Get Your Questions In Now

Company News
From time to time, when my incredibly busy (cough)vacation(/cough) schedule permits, I do a live Office Hours stream where I take your questions and answer ’em live. I’m going to do a couple of them this week, but I’m going to do them disconnected. I’ll be recording them on the road – Erika and I…
Read More

Tweets You Missed

You don’t follow me on Twitter because you’re not on Twitter, and I can’t say that I blame you. It’s a bunch of people yelling at each other. Come to think of it, I’m not even sure why *I’m* on there. But anyway, here are a few things I’ve said on there lately that you’ll…
Read More

Why Are Linked Server Queries So Bad?

No, I don’t want to be your valentine. Remember when you were in school, and you had a crush on someone? You would write a note asking them to be your valentine, and you’d ask a mutual friend to pass the note over to them. The adult equivalent is linked server queries. When your query…
Read More
Fundamentals of Columnstore

Lock Escalation Sucks on Columnstore Indexes.

Columnstore Indexes
1 Comment
If you’ve got a regular rowstore table and you need to modify thousands of rows, you can use the fast ordered delete technique to delete rows in batches without hitting the lock escalation threshold. That’s great for rowstore indexes, but…columnstore indexes are different. To demo this technique, I’m going to use the setup from my…
Read More

Adding Managed Instances to SQL Server Distributed Availability Groups

SQL Server Always On Availability Groups help you build a more highly available database server by spanning your database across two or more SQL Server instances. When the primary goes down, the secondary can take over. You can also scale out reads to the secondary servers. Distributed Availability Groups take this a step further and…
Read More

Learn Fundamentals of Index Tuning for $1.

You’re lazy and overconfident. You’ve been reading this blog for a while, and you’ve been telling yourself, “Yeah, I’m pretty good at this database thing. I’ve got years of experience under my belt. I know the fundamentals.” You’ve told yourself, “Yeah, someday I’ll get to Brent’s How to Think Like the Engine class,” but…you’ve never…
Read More

What does SET NOCOUNT ON do?

When you’re working with T-SQL, you’ll often see SET NOCOUNT ON at the beginning of stored procedures and triggers. What SET NCOUNT ON does is prevent the “1 row affected” messages from being returned for every operation. I’ll demo it by writing a stored procedure in the Stack Overflow database to cast a vote: CREATE…
Read More