Re: join to view over custom aggregate seems like it should be faster - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: join to view over custom aggregate seems like it should be faster
Date
Msg-id b42b73150704091436g7fd1f903q1209218fc5eee88d@mail.gmail.com
Whole thread Raw
In response to Re: join to view over custom aggregate seems like it should be faster  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: join to view over custom aggregate seems like it should be faster
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: join to view over custom aggregate seems like it should be faster
Next
From: Tom Lane
Date:
Subject: Re: how to efficiently update tuple in many-to-many relationship?