Re: Bad plan for join to aggregate of join.

From: Mischa Sandberg <mischa(at)ca(dot)sophos(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Bad plan for join to aggregate of join.
Date: 2006-09-13 00:51:27
Message-ID: 4507560F.9020906@ca.sophos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane wrote:
> Mischa Sandberg <mischa(at)ca(dot)sophos(dot)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.

Thanks.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-09-13 06:35:03 Re:
Previous Message Mark Kirkwood 2006-09-13 00:14:52 Re: Poor performance on seq scan