Month: December 2023

Plansplaining part 26 – Windows with a ranged frame

1 Comment
This is part twenty-six of the plansplaining series. And already the fourth episode about window functions. The first of those posts covered basic window functions; the second post focused on fast-track optimization for running aggregates, and the third post explained how the optimizer works around the lack of execution plan support for UNBOUNDED FOLLOWING. But all of those were about OVER specifications that use the ROWS keyword. Let’s now look at the alternative, the RANGE keyword. RANGE instead of ROWS When a RANGE specification is used, then number PRECEDING and number FOLLOWING are not allowed. So this leaves us with…

T-SQL Tuesday 169 – Thank you, community!

No Comments
It is December. And it is Tuesday. So I guess it’s time for T-SQL Tuesday again. Our host this month is Kay Sauter, and his seasonally inspired topic is to call out the gratitude that we often feel towards other, but fail to express. This is a very easy task for me. If you’re a regular reader of this blog, then you will know that, during the last year, my focus was more on being ill and getting better than on dissecting execution plans (although I never really fully stopped doing the latter 😉). During all that time, the support…

Plansplaining part 25 – Windows without upper bound

No Comments
This is part twenty-five of the plansplaining series, and the third part that covers window functions. I have already explained how basic window functions work, with or without a window frame. When a window frame is present, a Window Spool operator will, for each row, return first that row, and then all rows that are visible in its frame. A Stream Aggregate then computes the requested aggregations on those rows. In the previous part, I then explained how “fast-track optimization” severely reduces the amount of work in cases where the window frame starts at UNBOUNDED PRECEDING. I also showed that…

Execution Plan Video Training – pre-orders open

No Comments
I have been working hard, the past months, to complete the next series of videos for the Execution Plan Video Training. The advanced level of block 3, Combining Data, is now ready. And from now until the end of the year, you can benefit from a nice pre-order discount. Advanced joins The basics of each of the four join operators are covered in the basic level of block 3. But there is a lot more to be told about these operators, and that is what the advanced level covers. There are four videos (“chapters”) in this level. Only one of…

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.