Hitoshi Harada <umi.tan...@gmail.com> writes:
> I believe the changes will probably not be 2-3 lines (ie. a member
> added to Query structure, etc) if I try it. But the optimizer part is
> too complicated to me so that I am not sure, either. My idea above is
> that the similar mechanism you see in GROUP BY optimization will help
> you and the issue is not so particular about window functions.

The real question is what benefit you expect to get.  If the filter
condition can't be pushed below the window functions (which AFAICS it
can't without changing the results) then there is really nothing to be
gained compared to leaving it in the outer query level.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to