Skip site navigation (1) Skip section navigation (2)

Re: Bad plan for join to aggregate of join.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mischa(at)ca(dot)sophos(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Bad plan for join to aggregate of join.
Date: 2006-09-12 23:42:30
Message-ID: 3215.1158104550@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
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.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Mark KirkwoodDate: 2006-09-13 00:14:52
Subject: Re: Poor performance on seq scan
Previous:From: Luke LonerganDate: 2006-09-12 22:18:11
Subject: Re: Poor performance on seq scan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group