Re: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses
Дата
Msg-id 32204.1397403101@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Window function optimisation, allow pushdowns of items matching PARTITION BY clauses  (David Rowley <dgrowley@gmail.com>)
Ответы Re: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses  (David Rowley <dgrowley@gmail.com>)
Список pgsql-hackers
David Rowley <dgrowley@gmail.com> writes:
> On this thread
> http://www.postgresql.org/message-id/52C6F712.6040804@student.kit.edu there
> was some discussion around allowing push downs of quals that happen to be
> in every window clause of the sub query. I've quickly put together a patch
> which does this (see attached)

I think you should have check_output_expressions deal with this, instead.
Compare the existing test there for non-DISTINCT output columns.

> Oh and I know that my function var_exists_in_all_query_partition_by_clauses
> has no business in allpaths.c, I'll move it out as soon as I find a better
> home for it.

I might be wrong, but I think you could just embed that search loop in
check_output_expressions, and it wouldn't be too ugly.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch to fix a couple of compiler warnings from 80a5cf64
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Signaling of waiting for a cleanup lock?