pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: join to view over custom aggregate seems like it should be faster
Date: Mon, 9 Apr 2007 17:36:47 -0400
Message-ID: <b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com> (raw)
In-Reply-To: <10651.1176152866@sss.pgh.pa.us>
References: <b42b73150704091205o668a084y1693520c974f3c6b@mail.gmail.com>
	<10651.1176152866@sss.pgh.pa.us>

On 4/9/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Merlin Moncure" <mmoncure@gmail.com> writes:
> > I have an odd performance issue on 8.2 that I'd thought I'd document
> > here.  I have a workaround, but I'm if there is something that I'm not
> > seeing.
>
> It's hard to comment on this without seeing the full details of the view
> and tables.  I'm wondering where the SubPlans are coming from, for instance.

ah, it looks like the aggregate is being re-expanded for each field
returned by the aggregate.  I notice this for non-trivial record
returning functions also.  standard m.o. is to push into a subquery
and expand afterwords.

merlin



view thread (8+ messages)  latest in thread

Message-ID: <b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com>
Permalink:  ../b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: mmoncure@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: join to view over custom aggregate seems like it should be faster
  In-Reply-To: <b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com>
  References: <b42b73150704091205o668a084y1693520c974f3c6b@mail.gmail.com> <10651.1176152866@sss.pgh.pa.us> <b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox