2008/10/21 Heikki Linnakangas <[EMAIL PROTECTED]>: > Hitoshi Harada wrote: >> >> The real problem is not how to cut off preceding rows, but how to read >> ahead after the current row. I intend to avoid reading ahead until end >> of the partition for only row_number() that doesn't need any following >> rows. Sometimes we have to store whole the partition before returning >> the first result and sometimes not. It depends on function categories, >> or function access range. My current idea is classify Window function >> API to three parallel to buffering strategies. > > Could the rows be read ahead on demand? If the window function calls > window_getarg on a row that's not yet fetched, fetch forward to that row.
Well, it could be possible. But from my current view it will be very complicated and might be impossible. So I will try to implement basic approach, and let's consider your approach then. We keep stay in private API so that we have time to consider again. Regards, -- Hitoshi Harada -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers