Re: The Future of Aggregation

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "kevin(dot)grittner(at)enterprisedb(dot)com" <kevin(dot)grittner(at)enterprisedb(dot)com>, "amit(dot)kapila(at)enterprisedb(dot)com" <amit(dot)kapila(at)enterprisedb(dot)com>, Simon Riggs <simon(dot)riggs(at)2ndquadrant(dot)com>
Subject: Re: The Future of Aggregation
Date: 2015-06-10 04:17:03
Message-ID: 5577BA3F.6050806@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/9/15 9:52 AM, Kevin Grittner wrote:
> Yeah, I think we want to preserve the ability of count() to have a
> simple state, and implement dependent aggregates as discussed in
> the other thread -- where (as I understood it) having sum(x),
> count(x), and avg(x) in a query would avoid the row-by-row work for
> sum(x) and count(x), and just invoke a final function to extract
> those values from the transition state of the avg(x) aggregate. I
> see incremental maintenance of materialized views taking advantage
> of the same sort of behavior, only maintaining the state for avg(x)
> during incremental maintenance and*at the end* pulling the values
> for sum(x) and count(x) out of that.

Last I checked, Oracle forbade things like avg() in matviews. Since it's
trivial to calculate avg() by hand, I don't see that as a big deal. It'd
be nice to not require that, but it'd be MUCH nicer to have any kind of
incremental matview update.

Just trying to keep things in perspective. :)
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-06-10 04:42:33 [idea] table partition + hash join
Previous Message David Rowley 2015-06-10 04:10:40 Typo fix loged vs logged.