Re: Bad plan for join to aggregate of join.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bad plan for join to aggregate of join.
Дата
Msg-id 3215.1158104550@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bad plan for join to aggregate of join.  (Mischa Sandberg <mischa@ca.sophos.com>)
Ответы Re: Bad plan for join to aggregate of join.  (Mischa Sandberg <mischa@ca.sophos.com>)
Список pgsql-performance
Mischa Sandberg <mischa@ca.sophos.com> writes:
> can PG see that a join on an grouped-by field
> can be pushed down into the query as an indexable filter?

No.  The GROUP BY serves as a partial optimization fence.  If you're
concerned about the speed of this query, I recommend making a different
view in which 'message' is joined inside the GROUP BY.

            regards, tom lane

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

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: Poor performance on seq scan
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Poor performance on seq scan