Re: Functional dependency in GROUP BY through JOINs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Functional dependency in GROUP BY through JOINs
Дата
Msg-id 5474.1354814492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Functional dependency in GROUP BY through JOINs  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Functional dependency in GROUP BY through JOINs
Re: Functional dependency in GROUP BY through JOINs
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 5 December 2012 23:37, David Rowley <dgrowleyml@gmail.com> wrote:
>> Though this plan might not be quite as optimal as it could be as it performs
>> the grouping after the join.

> PostgreSQL always calculates aggregation as the last step.

> It's a well known optimisation to push-down GROUP BY clauses to the
> lowest level, but we don't do that, yet.

> You're right that it can make a massive difference to many queries.

In the case being presented here, it's not apparent to me that there's
any advantage to be had at all.  You still need to aggregate over the
rows joining to each uniquely-keyed row.  So how exactly are you going
to "push down the GROUP BY", and where does the savings come from?
        regards, tom lane



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Commits 8de72b and 5457a1 (COPY FREEZE)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Serious problem: media recovery fails after system or PostgreSQL crash