I love Query Plans
It’s a beast, but it’s my kind of beast. At around 4500 lines of code, when you want to make a change, well, &^%$ happens sometimes.
It used to make sense
When the plan cache was the only bar in town, that’s where you clinked your glasses.
It was okay that sometimes it was packed and sometimes it was dead and sometimes they were out of what you wanted to order.
With the advent of the Query Store, it was like, well, the plan cache got gentrified.
You didn’t have to worry about restarts anymore, there was some GUI love, and much more in the way of information persisted to views that you used to have to go gnarling through XML to pull out if you wanted to do any searching on your own.
All that XML processing was slow and expensive, too. I had a couple copy/paste incidents with Code From The Wild© on servers I was desperately hoping to find some problems on (in the process I probably created some problems).
Kick it around and talk some more
I’d been planning, and I’ve actually started and decided I hated, several iterations of a stored procedure to go at Query Store. Due to Other Things® coming up and all the usual excuses (not to mention the perilously low adoption rates for versions of SQL that actually have Query Store on them — we just don’t have much 2016 work coming through the door) I kept putting it off.
But then vNext/2017 happened.
And that damn Wait Stats DMV.
And now I’m just a little too excited about getting something written.
But I’d love to hear from you, first.
What questions would YOU like to ask the Query Store?
Best Laid Plans
My vision for the moment is to bring a lot of the same information and warnings out of plans, and probably the same options for sorting (CPU, reads, etc.), but with the opportunity to ask some more interesting questions up front.
This doesn’t mean sp_BlitzCache is going away. As long as there’s a plan cache, and people using versions of SQL prior to 2016, well, there will probably be a need for it. At least until they’re all out of support. Ho ho ho, ha ha ha.
It also gives me a chance to tame some of that absolutely insane dynamic SQL.
So, please, if there’s anything out there you’d like to see, figure out if it’s possible, whatever, leave a comment.
I’ll be here forever, writing XQuery and dynamic SQL, so you don’t have to.