Posts by Erik Darling

From The Server To The SAN

Enter SANdman When people buy SANs, it’s often quite a large investment. Whether it’s all SSD, all flash, or there are tiers of storage that different types of data live on, those disks aren’t cheap. When people visualize their SAN, it’s usually just the server and the pool of drives. But there’s some important stuff…
Read More

Fast Food Code

Cheap and Easy We’ve all done it. We all know what and where it is, because we’ve probably left a comment for ourselves to go fix it later. It wasn’t me, I swear to myself. Either it was expedient, it seemed to work locally, it was fast on a small amount of data, or we…
Read More

When Does SARGability Matter Most?

!erehT iH I know what you’re thinking. Another post about how you should just never do this one thing and all your queries will magically end up faster. Just watch the video.   For more reading, check out these posts: Sargability: Why %string% Is Slow Optional Parameters and Missing Index Requests Computed Columns: Reversing Data…
Read More

Never Judge A Query By Its Cost

Signs and Numbers When tuning queries, or even finding queries to tune, there’s a rather misguided desire to look for queries with a high cost, or judge improvement by lowering query cost. The problem is that no matter what you’re looking at, costs are estimates, and often don’t reflect how long a query runs for…
Read More

Indexed View Creation And Underlying Indexes

Accidental Haha While working on some demos, I came across sort of funny behavior during indexed view creation and how the indexes you have on the base tables can impact how long it takes to create the index on the view. Starting off with no indexes, this query runs in about six seconds. Transact-SQL DECLARE…
Read More

Updated First Responder Kit for November 2018: Get Into Sports Dummy

COACH! I dunno, I just like this picture. You can download the updated here. sp_Blitz Improvements #1786 – @dallyhorton made a good point: if we’re gonna warn you about Change Tracking, we should tell you which database it’s enabled for. #1791 – Who do DMV queries think they are, blocking each other? Get over yourselves. #1793 – CheckIds shouldn’t be…
Read More

Not So Forced Parameterization

Asking The Wrong Question Sometimes, when you wanna turn on a feature, you spend so much time wondering if you should, you don’t bother asking if it’ll even work when you do. There are a long list of things that are incompatible with Forced Parameterization, on a page that’s pretty hard to find. Now, there’s…
Read More