Re: Spilling hashed SetOps and aggregates to disk
От
Andres Freund
Тема
Re: Spilling hashed SetOps and aggregates to disk
Дата
Msg-id
20180605124230.etvuxdoulazo6zxo@alap3.anarazel.de
Ответ на
Re: Spilling hashed SetOps and aggregates to disk (Jeff Davis)
Список
Дерево обсуждения
Spilling hashed SetOps and aggregates to disk Heikki Linnakangas <hlinnaka@iki.fi>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk David Fetter <david@fetter.org>
Re: Spilling hashed SetOps and aggregates to disk David Fetter <david@fetter.org>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tom Lane <tgl@sss.pgh.pa.us>
Re: Spilling hashed SetOps and aggregates to disk David Fetter <david@fetter.org>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk David Gershuni <dgershun@cs.cmu.edu>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Robert Haas <robertmhaas@gmail.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Robert Haas <robertmhaas@gmail.com>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Tom Lane <tgl@sss.pgh.pa.us>
Re: Spilling hashed SetOps and aggregates to disk Robert Haas <robertmhaas@gmail.com>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Claudio Freire <klaussfreire@gmail.com>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk David Gershuni <dgershun@cs.cmu.edu>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk David Gershuni <dgershun@cs.cmu.edu>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk David Gershuni <dgershun@cs.cmu.edu>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk Robert Haas <robertmhaas@gmail.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Andres Freund <andres@anarazel.de>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
RE: Re: Spilling hashed SetOps and aggregates to disk serge@rielau.com
Re: Spilling hashed SetOps and aggregates to disk Tomas Vondra <tomas.vondra@2ndquadrant.com>
RE: Re: Spilling hashed SetOps and aggregates to disk serge@rielau.com
Re: Re: Spilling hashed SetOps and aggregates to disk Jeff Davis <pgsql@j-davis.com>
Re: Spilling hashed SetOps and aggregates to disk David Rowley <david.rowley@2ndquadrant.com>
Hi, On 2018-06-04 22:18:56 -0700, Jeff Davis wrote: > On Mon, 2018-06-04 at 11:52 -0700, Andres Freund wrote: > > I wonder whether, at least for aggregates, the better fix wouldn't be > > to > > switch to feeding the tuples into tuplesort upon memory exhaustion > > and > > doing a sort based aggregate. We have most of the infrastructure to > > do > > That's an interesting idea, but it seems simpler to stick to hashing > rather than using a combination strategy. It also seems like it would > take less CPU effort. Isn't the locality of access going to considerably better with the sort based approach? > What advantages do you have in mind? My patch partitions the spilled > data, so it should have similar disk costs as a sort approach. I think one part of it is that I think the amount of code is going to be lower - we essentially have already all the code to handle sort based aggs, and to have both sort and hash based aggs in the same query. We'd mostly need a way to scan the hashtable and stuff it into a tuplesort, that's not hard. nodeAgg.c is already more than complex enough, I'm not sure that full blown partitioning is worth the cost. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления