SQL Server

Watch Brent Tune Queries [Video]

SQL Server, Videos
4 Comments
Ever wonder how somebody else does it? Watch over my shoulder for this beautifully recorded one-hour session at SQLRally Nordic in Copenhagen from a couple weeks ago: The resources, scripts, and my Be Creepy process are all free too. Enjoy, and check out all of the session recordings for even more free learnin’.
Read More

Erik Darling Joins Brent Ozar Unlimited

SQL Server
37 Comments
Kendra here– we’re really excited to announce that we’ve hired Erik Darling on to join our team as a consultant. Erik’s first day is today. To introduce Erik, we’re sharing some of his answers to our call for job applications. We were so impressed, we knew we had to talk to him right away. What are…
Read More

Overheard in Performance Tuning Training Class

Humor, SQL Server
7 Comments
A sampling of things overheard at our 2015 Performance Troubleshooting Class in Denver: “I’m not a GUID hater.” “Oh, God help me. I’ve clicked on XML.” “Reporting Services looks around at the available memory, makes itself at home, maybe takes its pants off.” “Where would I go to check if I — hypothetically — accidentally set…
Read More

SQL Server Common Table Expressions

SQL Server
39 Comments
Common table expressions are a feature of SQL that lets a developer create a query that can be referenced multiple times. This feature gives developers another tool to add flexibility or just to simplify code. Why Common Table Expression? Why is it called a Common Table Expression (CTE)? Because that’s what the documentation calls it!…
Read More

sp_BlitzFirst v14 adds CPU % Utilization

SQL Server
1 Comment
When your SQL Server is having performance problems, sp_BlitzFirst® checks a bunch of common trouble spots. In this week’s new version, it also checks sys.dm_os_ring_buffers for the most recent CPU utilization report from SQL Server and returns it. Here’s what it looks like when the server isn’t under load – note that “No Problems Found” means…
Read More

Woohoo! We Won a Red Gate Tribal Award: Best Blog of 2014 (Again)

SQL Server
3 Comments
For the past two years, Red Gate’s Tribal Awards have let you, the SQL Server community, nominate and vote on their favorite community voices. Here’s the 2014 winners: Best New Community Voice: Cathrine Wilhelmsen (@CathrineW) Best Presentation at a Technical Conference: Dr. Rimma Nehme (@RimmaNehme) Best New SQL Book: SQL Server Query Performance Tuning by Grant Fritchey…
Read More

9 Ways to Lose Your Data

Every time someone tells me, “This database is mission critical – we can’t have data loss or downtime,” I just smile and shake my head. Technology is seriously difficult. To illustrate, here’s a collection of client stories from the last few years: The DBCC CHECKDB job ran every week just like it was supposed to…
Read More
Extended Events None Found

Extended Events Sessions: Messing Up Filters

SQL Server
8 Comments
Recently, I wanted to play around with the auto_stats event against a test system running SQL Server 2014. I ran through the session setup GUI and added the auto_stats event. I configured it with a filter (predicate) to only show me auto_stats event in a database named AutoStatsTest. There’s a cost to events that may fire frequently and a…
Read More

Using “OR” and “IN” with SQL Server’s Filtered Indexes

Indexing, SQL Server
3 Comments
You can’t do everything with filtered indexes in SQL Server. For instance, you can’t create the following index: Transact-SQL CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId) WHERE (VoteTypeId = 1 OR VoteTypeId = 2); GO 123 CREATE INDEX IX_Votes_filter ON dbo.Votes (PostId)     WHERE (VoteTypeId = 1 OR VoteTypeId = 2);GO If you try, you’ll get the error…
Read More