From: | Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> |
---|---|
To: | Daniel Farina <drfarina(at)acm(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Windowing Qual Pushdown |
Date: | 2010-03-23 07:19:36 |
Message-ID: | e08cc0401003230019l53f9ee93t758239519a4cc3fe@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/3/21 Daniel Farina <drfarina(at)acm(dot)org>:
> In the function "subquery_is_pushdown_safe", there is an immediate
> "false" returned if the subquery has a windowing function. While that
> seems true in general, are there cases where we can push down a qual
> if it is on the partitioning key? Or do NULLs or some other detail
> get in the way?
Ugh, that seems true. In similar case you can push down WHERE clause
of outer query to subquery if the qual clause match GROUP BY clause.
This is done by transforming outer WHERE -> HAVING -> inner WHERE.
However, window function querys don't have such clause as HAVING of
aggregate. If you implement that optimization, we need have kind of
implicit, homologous qual information. Sure, it's possible.
Regards,
--
Hitoshi Harada
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2010-03-23 07:22:10 | Re: Windowing Qual Pushdown |
Previous Message | Fujii Masao | 2010-03-23 07:17:53 | Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL |