Erik Darling has a new video. This one is on variable assignment and how SET and SELECT behave somewhat differently. The crux of the video is how SELECT will not reset a variable’s value the result of the assignment is NULL. Erik also shows how to make SELECT respect NULL in variable assignment.
Author: Kevin Feasel
It’s time for our quarterly update of our SQL ConstantCare® population report, showing how quickly (or slowly) folks adopt new versions of SQL Server. In short, people are replacing SQL Server 2016 and 2017 with 2022!
I do think that 2025 will pick up steam. The marginal change was mostly into 2022, but 2025 wasn’t officially released until November and I’m guessing not many companies upgraded in December. I do think we’ll see some pickup of SQL Server 2025 in this quarter.
As always, this is my throat-clearing reminder that what Brent has is a biased sample of the SQL Server population and is not necessarily reflective of the population as a whole. It’s a very interesting sample upon which to reflect, but its specific bias is that it necessarily only includes customers of Brent Ozar’s service, which will be a specific subset of organizations.
Leave a CommentLouis Davidson does some testing:
A few weeks ago, there was a LinkedIn post (I can’t find it anymore) that covered something about how indexes were used by
COUNTin SQL. I think it may have been based on SQL Server, but I am not sure (it is rare that one of the SQL posts on LinkedIn mentions a platform). At the time, I went and tried a few of the mentioned cases and realized this was an interesting question: how does the COUNT aggregate use indexes when you use various different expressions.
Louis has a series of test cases and I got most of them right, though I wasn’t sure about one particular optimization.
Leave a CommentTom Peplow makes an announcement:
In October 2025, we introduced OneLake diagnostics—a powerful capability that helps teams “answer who accessed what, when, and how” across your Fabric Lakehouse environment. OneLake diagnostics streams JSON-based activity logs into a Lakehouse you choose, enabling rich analysis, governance, and compliance workflows. A powerful capability that helps teams “answer who accessed what, when, and how” across your Fabric Lakehouse environment. OneLake diagnostics streams JSON-based activity logs into a Lakehouse you choose, enabling rich analysis, governance, and compliance workflows.
We are strengthening that foundation with the introduction of immutable diagnostic logs—a new capability that ensures diagnostic events cannot be altered or deleted for a defined retention period, giving you tamper-proof data for the entire lifecycle of your logs.
I do like the idea, but beware the additional costs: immutable also means you can’t delete it later, so 10 years from now, you’re still going to be paying for this diagnostic data.
Leave a CommentWhat I’m writing about today has nothing to do with analytics, per se. It has everything to do with cloud storage, and the way operations there are priced. Specifically, metadata operations–in the demo code I’ve shared we’re going from five files to one, but you can imagine going from a much larger number of files to much smaller number of files. You may ask–“Joey that sounds dumb, why are you reinventing zip and iso files”. Well, the main reason is that many cloud operations are priced on the number of objects–for example if you had to calculate a checksum across a number of files on S3. (For files/objects that were created before S3 automatically did checksums).
Click through for more information on how it works, as well as a link to the GitHub repo.
Leave a CommentGilbert Quevauvilliers puts on the lab coat and safety goggles:
I was recently part of a discussion (which I have heard of multiple times), which was which semantic model to use in Microsoft Fabric.
This was the source for this blog post where I am going to compare Microsoft Direct Lake (DL) to an Import Semantic Model. The goal is to first explain how I set up and configured the comparison.
And in the next blog post I will show the tests and the outcome based on my testing.
This is the first part in a series and covers the setup process for testing. We’ll have to wait until next time for the results.
Leave a CommentThe official documentation provides a good introduction. But beneath this straightforward interface lies a set of more complex properties than most of us realise. Arrays in PostgreSQL are not just “lists” in a field. They have their own memory management strategy, their own index logic, and a lot of edge-case scenarios.
As it goes with boringSQL deep-dives, this article will explore the corners of array functionality that might break your production.
Click through for some not-boring explanation around arrays in PostgreSQL.
Leave a CommentBrent Ozar has another year of data:
The results are in! You can download the raw data in Excel for all 10 years and do some slicing and dicing to find out whether you’re underpaid, overpaid, or what it looks like for folks who are out there looking for work.
This year, I added a couple of new items to the survey asking about folks who are unemployed and currently looking for work. In hindsight, I wish I would have done this long ago so that we could have a baseline to know whether things have gotten better or worse. Ah, well – the best time to plant a tree was 20 years ago, and the second-best time is now. Let’s dig into the data and see what we find.
Click through for Brent’s initial findings and have fun analyzing the data.
Leave a CommentAaron Bertrand sorts out an error:
Msg 537, Level 16, State 3Invalid length parameter passed to the LEFT or SUBSTRING function. The invalid length error, as shown above, occurs when you have incorrect or unexpected input to a string function.
Read on for examples of how you can trigger this error and what you can do to prevent it.
Leave a CommentValerie Junk demonstrates a process:
In this tutorial, I will recreate a project I built last year: a mini Power BI dashboard with a toggle button to change its appearance. When you toggle the button, the background color changes, the logo and snow switch images are updated, and the visuals are restyled accordingly (including the color of the trees).
This project combines different tutorials I created in the past, which cover dynamic color changes and the lollipop visual.
At the bottom of this page, you will find a step-by-step video, and you can download the file from the download page.
Click through for instructions, the video, and a zip file to work from.
Leave a Comment