On 4/9/07, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"Merlin Moncure" <mmoncure@xxxxxxxxx> 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