Re: Optimizing aggregates - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Optimizing aggregates
Date
Msg-id 20160831161050.zgwx7f46ul3gu3xn@alap3.anarazel.de
Whole thread Raw
In response to Re: Optimizing aggregates  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On 2016-08-31 19:07:00 +0300, Heikki Linnakangas wrote:
> On 08/31/2016 06:51 PM, Andres Freund wrote:
> > I've first combined the projection for all the aggregates, ordered set,
> > or not, into one projetion. That got rid of a fair amount of overhead
> > when you have multiple aggregates.  I attached an, probably out of date,
> > WIP version of that patch.
> 
> A-ha, I also considered doing just that! I also considered a variant where
> we call ExecProject once for all non-ordered aggregates, and a separate
> ExecProject() for each ordered one. But just switching back to straight
> ExecEvalExprs seemed easier.

The issue is that might, I think, end up iteratively deforming the
underlying tuple. The projection machinery takes care of that, if we do
it in one go.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Optimizing aggregates
Next
From: Simon Riggs
Date:
Subject: Proposal for changes to recovery.conf API