Hitoshi Harada wrote:
> Hi,
>
> 2008/10/20 Simon Riggs <simon@2ndquadrant.com>:
>> On Mon, 2008-10-20 at 10:32 +0900, Hitoshi Harada wrote:
>>
>>> So I propose three Window node buffering strategies,
>>> row/frame/partition buffering so as to avoid unnecessary row
>>> buffering.
>> Sounds good from here. Can I suggest you release the code in phases?
>>
>> It would be better if we got just one of those done (row?), than to
>> attempt all 3 and end up with none because of emerging details.
>
> Thank you for your feedback.
> Ok, actually the first will be partition buffering, because it covers
> all of the functions' requirement. The row buffering is kind of
> optimization in the special case.
The thought I had during the last commit fest was that the function
would call a callback, something like window_forget(pos), that would
tell the system that it can release any rows before the given position.
That way you only need one method, and it's also be optimal for
functions like lag(), that doesn't fit perfectly into either the row or
frame buffering category. Or do we need the information at plan-time?
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com