On Mon, Jan 9, 2017 at 12:56 PM, Antonin Houska <a...@cybertec.at> wrote: > Attached is a draft patch that lets partial aggregation happen at base > relation level. If the relations contain relatively small number of groups, > the number of input rows of the aggregation at the query level can be reduced > this way. Also, if append relation and postgres_fdw planning is enhanced > accordingly, patch like this can let us aggregate individual tables on remote > servers (e.g. shard nodes) and thus reduce the amount of rows subject to the > final aggregation.
Very interesting. I don't have time to study this in detail right now, but as a concept it seems worthwhile. I think the trick is figuring out at which levels of the path tree it makes sense to consider partial aggregation. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers