[Video] Office Hours: The Long One
Brent Ozar Blog
by Brent Ozar
4h ago
You posted a lot of great questions at https://pollgab.com/room/brento and I spent almost an hour covering these: 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 approx 35% usage during the business week to 85% on Monday morning. How can I troubleshoot the scripts that are causing this increase? 03:28 mailbox: Hey Brent, What is the difference between vertically partitioning a table into 2 tables, and creating a non-clustered index on a subset of the co ..read more
Visit website
[Video] Office Hours in Snowy Telluride, Colorado
Brent Ozar Blog
by Brent Ozar
1w ago
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 Meta Quest, download this 2GB video directly – YouTube doesn’t seem to support MV-HEVC video just yet. If you’re on an AVP, go to that URL, then when the video starts to play, click Stop. (Safari doesn’t play spatial videos yet.) Click the Share button up by the URL, then choose ..read more
Visit website
Does Your GROUP BY Order Matter?
Brent Ozar Blog
by Brent Ozar
1w ago
Sometimes when you do GROUP BY, the order of the columns does matter. For example, these two SELECT queries produce different results: 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 FROM dbo.Users GROUP BY DisplayName, Location ORDER BY DisplayName, Location; Their actual execution plans are wildly different: They both use the index to retrieve their data, sure, but ..read more
Visit website
Free Live Webcasts: Slide & Demo Versions of How to Think Like the Engine
Brent Ozar Blog
by Brent Ozar
1w ago
You’re comfortable writing queries to get the data you need. But you’re uncomfortable if someone asks you how it works, how SQL Server and Azure SQL DB turn your queries into results. You know there are execution plans, but … you’re uncomfortable reading them. You know queries need indexes, but you’re not sure which columns to put in order, or how SQL Server chooses between them. I’d like to teach you How to Think Like the SQL Server Engine for free. In a 2-hour live session, you’ll learn the differences between clustered & nonclustered indexes, why seeks aren’t necessarily good and s ..read more
Visit website
[Video] Office Hours: Speed Round
Brent Ozar Blog
by Brent Ozar
2w ago
Not all of the questions y’all post at https://pollgab.com/room/brento require long-winded answers. Let’s conquer 22 questions in 15 minutes! Here’s what we discussed: 00:00 Start 01:05 JoseDBA: We just started monitoring our AlwaysOn with Datadog. Any recommendations of what to monitor that is valuable and not filling ourselves with meaningless alerts? Thanks! 01:43 Boutaga: Hey Brent ! Good morning from Switzerland ! As a DBA I have a lot of struggle explaining Devops guys to implement CI/CD all the way to the database… What do think would be a limitation technically for Devops ? What coul ..read more
Visit website
Option Recompile is a Magic Turbo Button That Actually Works.
Brent Ozar Blog
by Brent Ozar
2w ago
I didn’t say that – Guy Glantser did. Guy Glantser is an Israeli SQL Server guru with a ton of great presentations on YouTube. I’ve had the privilege of hanging out with him in person a bunch of times over the year, and I’ll always get excited to do it again. He’s not just smart, but he’s friendly and funny as hell. Matan Yungman, Guy Glantser, and I In the most recent SQL Server Radio podcast, Guy explained what OPTION RECOMPILE does, and basically suggested that everyone should be comfortable using it outside of OLTP or high-CPU environments. In fact, if you’re working on data warehouses, Gu ..read more
Visit website
What Happens When Multiple Queries Compile at Once?
Brent Ozar Blog
by Brent Ozar
3w ago
An interesting question came in on PollGab. DBAmusing asked: If a query takes 5-7s to calculate the execution plan (then executes <500ms) if multiple SPIDS all submit that query (different param values) when there’s no plan at start, does each SPID calc the execution plan, one after the other after waiting for the prior SPID to finish? Well, it’s easy enough to demonstrate! Let’s take a query from my Fundamentals of Query Tuning class that takes tens of seconds (or longer) to generate a plan on most versions and compat levels: DECLARE @TheRootOfAllEvil TABLE (Id INT PRIMARY KEY CLUSTER ..read more
Visit website
Finding Sister Locations to Help Each Other: Answers & Discussion
Brent Ozar Blog
by Brent Ozar
3w ago
This week’s query exercise asked you to find two kinds of locations in the Stack Overflow database: Locations populated with users who seem to be really helpful, meaning, they write really good answers Locations where people seem to need the most help, meaning, they ask a lot of questions, but they do not seem to be answering those of their neighbors In the challenge post, I gave you the same kinds of requirements that our end users would typically give, but not the kinds of requirements that a business analyst might specify. This challenge was actually inspired by a friend of mine who ..read more
Visit website
[Video] Office Hours From the Future
Brent Ozar Blog
by Brent Ozar
3w ago
To answer today’s questions from https://pollgab.com/room/brento, I strapped on my Apple Vision Pro and recorded my persona as if we were on a FaceTime or Zoom call together. It’s delightfully creepy, as if I’m AI Brent from the Future. Here’s what we covered: 00:00 Start 00:44 Rushabh Shah: I have a question regarding the DBCCSHRINKFILE command. Is it advisable to run the DBCCSHRINKFILE for the NDF file to the target site, leaving 10% free space? Do we need to consider any impact on HA/AG with 4 nodes? How to stop the DBCCSHIRNKFILE operation safely? 01:41 SQLPadawan: hey Brent, asking for ..read more
Visit website
Read This Before Your Users Install SSMS 20
Brent Ozar Blog
by Brent Ozar
3w ago
SQL Server Management Studio 20 Preview 1 is out, and the new connection dialog has a big change: When you click Connect, you’re likely going to get an error: The fastest fix is to click the Encryption dropdown, and change it to Optional: And then you’ll be able to connect fine. The long term fix is to read this announcement post, then read this post about the certificate requirements, then set up certificates on all your SQL Servers. As far as I can tell, it’s not as easy as just copying a sample script from Stack Overflow, bucko – for example, if you’re using an AG listener, you have addi ..read more
Visit website

Follow Brent Ozar Blog on FeedSpot

Continue with Google
Continue with Apple
OR