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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 12 Sep 2006 19:42:30 -0400
  • Message-id: <3215(dot)1158104550(at)sss(dot)pgh(dot)pa(dot)us>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group