Posts by Erik Darling

Pocket Square

sp_BlitzQueryStore: A Gentle Introduction

Odds and ends During the precon, we asked how many people were on 2016, how many people were aware of query store, how many people were using it, and how many people were using sp_BlitzQueryStore. About 1/3 of the hands went up at first, then for each successive question, fewer and fewer hands stayed up.…
Read More
Pocket Square

First Responder Kit Release: Treating Object References Like Object Instances, Man

Object reference not set to an instance of an object. You can download the updated FirstResponderKit.zip here. sp_Blitz Improvements #1281 We’ve lowered the priority of Query Store being disabled. It’s just not as important as the backups you’re not taking and the corruption checks you’re not running. sp_BlitzCache Improvements #1253 Due to an unfortunate copy and paste incident,…
Read More

First Responder Kit Release: The Ides Of November

IB Rewop This is a cleanup release to get some of the pull requests in that didn’t make it in before the precon. There’s also a secret unlockable character that Brent is blogging about next week! Please clap. You can download the updated FirstResponderKit.zip here. sp_Blitz Improvements #1199 We’ve updated the unsupported builds list! Now you can…
Read More

Implied Predicate and Partition Elimination

Execution Plans
11 Comments
>implying Way back when, I posted about turning the Votes table in the Stack Overflow database into a Partitioned View. While working on related demos recently, I came across something kind of cool. It works for both partitioned tables and views, assuming you’ve done some things right. In this example, both versions of the table…
Read More

SQL Server Workarounds

Development, SQL Server, T-SQL
14 Comments
360 Questions We’ve been asking you folks a lot about what you’d add to SQL Server, and we’ve gotten some great answers. There are even some that have been answered in the last couple versions of SQL Server. For instance, 2016 brought us STRING_SPLIT! SQL Server 2017 has a whole bunch of neat stuff: CONCAT_WS…
Read More

Do Variables Exist?

Humor, SQL Server
13 Comments
I know, I know I swore I’d never talk about variables again. Then I ran into some funny business. Maybe it was quite as funny as the Temp Table Ghosts, but hey. What’s as funny as temp tables? It’s in your heaaaaaaaad If I run this, what do you think will come back? Transact-SQL IF…
Read More

Adaptive Blog Posts

It turns out I can be dumb In a previous blog post about Adaptive Joins, I thought that EXISTS wasn’t supported by the new feature. It turns out that EXISTS is totally 100% supported, as long as your indexes support EXISTS. To show this, I need to show you a query that gets an Adaptive…
Read More

Why Columnstore Indexes May Still Do Key Lookups

I was a bit surprised that key lookups were a possibility with ColumnStore indexes, since “keys” aren’t really their strong point, but since we’re now able to have both clustered ColumnStore indexes alongside row store nonclustered indexes AND nonclustered ColumnStore indexes on tables with row store clustered indexes, this kind of stuff should get a…
Read More

Answering Questions For Fun And No Profit

Humor, SQL Server
2 Comments
I love answering questions about SQL My forum of choice is dba.stackexchange.com because I find the voting and point system with badges for being a decent internet person addictive. If you like more traditional forums, SQLServerCentral.com has a lot of really smart people on it as well. When I post questions or answers, I try…
Read More

The Ghosts of Temp Tables Past

Humor, SQL Server
18 Comments
True story You may find it hard to believe, but I recently had to fix a small bug in sp_BlitzCache and sp_BlitzQueryStore. Since both stored procedures have similar functions, they also share some temp table names (mainly the ones for parsing down XML nodes to more manageable chunks). In the window where I was making…
Read More