Rowgoals, part 3: When rowgoals backfire

Rowgoals, part 3: When rowgoals backfire

In part 1 of this mini-series, I explained what a rowgoal is and how it works to optimize a query with a TOP or FETCH expression. Part 2 then showed a few less obvious other cases where the optimizer might introduce rowgoals. In all cases so far, those rowgoals were beneficial. They helped the optimizer come up with the best execution plan for the number of rows requested.

Things can go wrong!

Unfortunately, there are cases where a plan that is optimized with a rowgoal turns out to be slower than without the rowgoal. The feature that is intended to make things go faster might actually slow your query down! Learn all about this in the video below!

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 visits. 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, for instance for custom built in house training, or if you just want me to fix your performance problems now.

Storage structures 2 – Columnstore
T-SQL Tuesday 195 – Code that aged well

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