Re: possible optimization: push down aggregates - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: possible optimization: push down aggregates
Date
Msg-id 53FFE75F.9040809@2ndquadrant.com
Whole thread Raw
In response to Re: possible optimization: push down aggregates  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-hackers
On 08/28/2014 03:46 AM, Claudio Freire wrote:
> You can't with mean and stddev, only with associative aggregates.
> 
> That's min, max, sum, bit_and, bit_or, bool_and, bool_or, count.

You could with a new helper function to merge the temporary states for
each scan though.

In the case of mean, for example, it'd just mean adding the counts and sums.

However, I'm not sure how interesting that is without the ability to
execute the subplans in parallel.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Why data of timestamptz does not store value of timezone passed to it?
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #9652: inet types don't support min/max