Re: The Future of Aggregation - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: The Future of Aggregation
Date
Msg-id 20150609150010.GT133018@postgresql.org
Whole thread Raw
In response to Re: The Future of Aggregation  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: The Future of Aggregation  (Kevin Grittner <kgrittn@ymail.com>)
Re: The Future of Aggregation  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Kevin Grittner wrote:
> David Rowley <david.rowley@2ndquadrant.com> wrote:

> > 5. Dependant Aggregates
> 
> > Item 5 makes items 1-4 a bit more complex as with this item
> > there's opportunity for very good performance improvements by
> > allowing aggregates like AVG(x) also perform all the required
> > work to allow SUM(x) and COUNT(x) to be calculated for "free" in
> > a query containing all 3 aggregates.
> 
> Not only CPU is saved, but the optimizations for materialized views
> would require the aggregate function's transition state to be saved
> in each row, and the duplicate state information among these
> functions would be a waste of space.

Uh, this also requires serialization and deserialization of non-
finalized transition state, no?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: The Future of Aggregation
Next
From: Andrew Dunstan
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file