Posts by Erik Darling

Adaptive Joins And SARGability

There’s a famous saying Non-SARGable predicates don’t get missing index requests. And that’s true! But can they also stifle my favorite thing to happen to SQL Server since, well, last week? You betcha!© One Sided I’m going to paste in some queries, each with something non-SARGable. There are two tables involved: Users and Posts. Only…
Read More

The 2017 Adaptive Join Optimization Eats Bad TSQL For Breakfast

Cheeky If you thought that title sounded familiar, you sure were right. That’s called a classical reference. So here we are, three whole years later, and yet another improvement to the engine promises to fix performance issues forever and ever. While this isn’t exactly an entirely new cardinality estimator, it’s an entirely new branch in…
Read More

First Responder Kit Release: Ça plane pour moi

Ah, May. Spring has sprung, and young people’s minds turn towards seasonal allergies. Special thanks to @digitalohm for the Differential Restore code and general sp_DatabaseRestore spiffiness. May you live to an age that can only be described in Unix. You can download the updated FirstResponderKit.zip here. sp_Blitz Improvements #857 Do you have any idea how much…
Read More

SQL Server 2017: Unpublished Gems

SQL Server 2017
0
Sneaky, sneaky, sneaky Release notes never seem to tell the full story, do they? At some point, you have to take matters into your own hands and go hunting for, as Paul Harvey would say, “The Rest Of The Story”. So what did I find? New stuff! Brand. New. Stuff. For you. If you ever…
Read More

SQL Server 2017: Quick Rundown

SQL Server 2017
5 Comments
ICYMI Playing with SSMS in the lab Microsoft released CTP 2 of SQL Server vNext (well, yesterday today, but who knows when this thing will hit?). There’s some great new stuff in the Engine in this release that I’m just crazy about getting to know better. Going through the Release Notes made me feel things…
Read More

Replacing ISNULL In A WHERE Clause

Execution Plans, T-SQL
4 Comments
I like blogging Really, I do. But sometimes I like a change of pace. Instead of blogging about this question, I posted it over on dba.stackexchange.com. Also, I thought it was an interesting question, and apparently many other people agreed. Not just because I wanted some more points, but because blog comments are notoriously sucky…
Read More

Fun With Logging Dynamic SQL

T-SQL
9 Comments
While working on a demo I thought this might make a fun aside to share on the blog, because working with dynamic SQL can be challenging. Especially if you don’t have a monitoring tool or application profiling to figure out who ran what and when, most of the time you’ll have no idea what went…
Read More

First Responder Kit Release: Now With 100% More Working Code Than The Irish Space Program

Every April I think about this girl I grew up with named April who smelled like Cheez-Wiz. She died tragically in a home for the blind on Taco Tuesday. Special thanks to @jeffrosenberg , @mrthomsmith , @rwhoward for contributing this month. Your complimentary oxygen is now available. The rest of you can go download the First…
Read More