Parameter Sensitive Plan Optimization

Parameter Sensitive Plan Optimization

Bad hair day? Try having an almost-no-hair month!

Jokes aside. It has been almost six weeks since my last video blog. Not really the schedule I had planned. But I believe I have good reasons.

Anyway, I do have a new video ready now. As promised in my last video, I now cover Parameter Sensitive Plan Optimization (PSPO), a new feature, introduced in SQL Server 2022, that is supposed to alleviate the pain of bad parameter sniffing.

PSPO, the answer to bad parameter sniffing?

The first part of the video explains the feature, and how it is intended to work. You will see an example where it prevents bad performance due to parameter sniffing. But even in that example, you also see a case where it does not achieve its goal.

After that, I look at the requirements for PSPO to kick in, and at the details of how the boundaries between low, medium, and high frequency are determined. This will expose many shortcomings of the feature, that I summarize at the end.

Does that make PSPO a bad feature? No. It’s just not the panacea that Microsoft marketing wanted us to believe. If it kicks in, then it will automatically fix some of the issues. But not all. And in many cases where it would be useful, it simply does not kick in at all. As a result, you will still have to fix (or, rather, prevent) these issues yourself. I don’t think there are any real world cases where just PSPO by itself fixes everything. Which means that it might as well not exist, because you have to do the manual fixes anyway.

More of me?

Was this useful to you? Do you want to learn more from me?

You can click here to see an overview of my scheduled conference talks. If you attend one of those, you get a lot of other presenters and sessions thrown in as well!

To learn really everything about SQL Server execution plans, check out my video training. Over 20 hours of super high quality video content (and more will be added when ready).

Or you can hire me to fix the performance problems on your server, or for in house training.

Back on track

Related Posts

No results found.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close