Press "Enter" to skip to content

Curated SQL Posts

The Server Room in the Attic

Thomas Rushton whips out a story:

Anyway. Big Victorian mill-type building. First floor, document management, printing, post rooms, etc, going up. Second floor – erm… document processing? Finance? Third floor – IT, call center, network room, board room, lawyer-types. Fourth floor, just underneath that slate roof, held a smaller office full of debt recovery specialists, and the main server room.

What could possibly go wrong?

Leave a Comment

100 Hours of Work

Steve Jones talks about a tough week:

I was a relatively new hire, a former intern, at a large electrical utility in Virginia. I worked as a network admin at a nuclear power plant in Surrey, VA. I showed up at work on New Year’s Eve at 5:00pm. We were planning on deploying a new database server running SQL Server, along with a new application to track radiation exposure for workers. This was a mandated change to our tracking, which needed to go live at midnight. I was supposed to be a bystander, helping developers from our internal group implement the server and then take over administration for the future.

What could possibly go wrong?

Leave a Comment

What “Clean Data” Means in Microsoft Fabric

Christian Henrik Reich lays it out:

You might have heard countless times that AI needs high-quality and clean data to work properly. However, this is often not accompanied by an explanation of what it actually means. In this post, I will explain how you can achieve this in Microsoft Fabric.

I’ll explain the foundation for how you can prepare your data so your solution can answer business questions, either through reporting or AI.

Clean data alone is not enough. Data also needs to be structured, understandable, and accessible in a way that allows your solutions to answer business questions reliably.

The fancy buzzword that describes a lot of what Christian covers is “ontology” but I appreciate this more detailed description versus relying on a buzzword as a crutch.

Leave a Comment

A Pernicious Floppy Disk

Deb Melkin deals with disaster:

One morning, the help desk support person came over and said this one client was having performance issues. This was one of the cases where we would just reboot. It was early and there would be plenty of time for everything to be back up and running before the system was needed. So I gave the go ahead to reboot the server.

This did not go well. Read on for the rest of the story.

Leave a Comment

DAX at the Correct Granluarity

Marco Russo and Alberto Ferrari provide some advice:

DAX code is often short. Understanding the question that the code must answer may be much harder.

Consider a calculation that multiplies a quantity by a rate. The formula appears simple, yet it is correct only if the quantity and the rate are evaluated while the rate has a clear meaning. If you perform the calculation after combining different rates, DAX must aggregate the rates somehow: AVERAGEMIN, or MAX can return a number. However, returning a number does not make that number meaningful.

Read the whole thing.

Leave a Comment

A Trio of Outages

Andy Yun has been a part of several outages over the years:

My very first job out of college, I worked at a small boutique internet consulting firm that did some hosting in our back office. We had a T1 line coming into our office, which was a space that was part of a strip mall actually. One summer morning, we’re at our desks doing our thing and “hey, I just lost Internet connection, anyone else?” 

Click through for the conclusion of that story, as well as two other times everything went sideways. This might also be a good time to check your backups and make sure they’re working fine.

Leave a Comment

Fixing a Problem from the Naval Yard

Andy Levy tells us a story:

A buddy of mine invited me to take a road trip and join him in Philadelphia, PA to take a tour of the USS New Jersey while she was in drydock for its required museum ship maintenance. Quite possibly a once in a lifetime opportunity – we wouldn’t be touring the inside of the ship, we would be walking around underneath her, on the floor of the drydock. I hit the road on Friday, and picked him up at the airport. We got dinner, unwound from our respective travels, and planned out the following day.

Click through to see what happened next.

Leave a Comment

DiskANN and Beam Search

Mala Mahadevan continues a series on vector search:

At this point, the consideration becomes – ‘What if the graph and all of its vectors don’t fit in memory?’

If every step of graph traversal had to wait for an arbitrary SSD read, the navigation could become painfully slow.

This is the plus and the minus of an index like HNSW. If you can fit everything into memory, it’s faster than DiskANN. Once you start paging in and out of disk, DiskANN becomes considerably faster.

Leave a Comment

To Make a DBA

Andy Brownsword tells his origin story:

I enjoy a good war story.

But no, this isn’t the time Azure blindsided me, when service accounts were locked, or when I left a transaction open and halted a production system (easily fixed by closing SSMS 😅). Mine is a pivotal personal moment.

Andy humbly leaves out the part where he was hand-to-hand kung fu fighting a series of ninjas while doing all of this, but you can just assume that in there.

Leave a Comment

The Importance of Application Names

Brent Ozar explains how powerful application names can be:

When you run monitoring queries like sp_BlitzWho and sp_WhoIsActive, you wanna see the program names that are running the queries. It’s super useful when you’ve got multiple apps running on the same servers, or when you’ve got apps scattered across end user computers.

If you don’t set the program names, you’ll either end up with empty strings, or your dev tool’s default name, like Core .Net SqlClient Data Provider, which doesn’t tell you jack.

And, once you do have application names established for everything, you can also set up Resource Governor to use those application names for the purpose of routing to Resource Governor pools.

Leave a Comment