Re: Windowing Qual Pushdown

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: Windowing Qual Pushdown
Дата
Msg-id e08cc0401003230019l53f9ee93t758239519a4cc3fe@mail.gmail.com
обсуждение исходный текст
Ответ на Windowing Qual Pushdown  (Daniel Farina <drfarina@acm.org>)
Ответы Re: Windowing Qual Pushdown  (Daniel Farina <drfarina@acm.org>)
Список pgsql-hackers
2010/3/21 Daniel Farina <drfarina@acm.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: Windowing Qual Pushdown