Skip site navigation (1) Skip section navigation (2)

Re: Missing optimization when filters are applied after window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Volker Grabsch <vog(at)notjusthosting(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Missing optimization when filters are applied after window functions
Date: 2012-05-16 13:25:13
Message-ID: 23583.1337174713@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Volker Grabsch <vog(at)notjusthosting(dot)com> writes:
> I propose the following general optimization: If all window
> functions are partitioned by the same first field (here: id),
> then any filter on that field should be executed before
> WindowAgg.

I'm not sure if that rule is correct in detail, but in any case the
short answer is that window aggregates are a new feature in Postgres
and we basically haven't done any optimization work on them yet.
Feel free to work in that area if it interests you...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2012-05-16 13:39:13
Subject: read() returns ERANGE in Mac OS X
Previous:From: Tom LaneDate: 2012-05-16 13:08:26
Subject: Re: 9.2beta1 regression: pg_restore --data-only does not set sequence values any more

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group