Re: Memory-Bounded Hash Aggregation
От
Jeff Davis
Тема
Re: Memory-Bounded Hash Aggregation
Дата
Msg-id
e52707d4665e32867fb6dd181825ef15f853b8bf.camel@j-davis.com
Ответ на
Re: Memory-Bounded Hash Aggregation (Taylor Vesely)
Список
Дерево обсуждения
Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Taylor Vesely <tvesely@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Andres Freund <andres@anarazel.de>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Melanie Plageman <melanieplageman@gmail.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Heikki Linnakangas <hlinnaka@iki.fi>
Re: Memory-Bounded Hash Aggregation Melanie Plageman <melanieplageman@gmail.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Andres Freund <andres@anarazel.de>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Andres Freund <andres@anarazel.de>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Andres Freund <andres@anarazel.de>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Justin Pryzby <pryzby@telsasoft.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Justin Pryzby <pryzby@telsasoft.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Pengzhou Tang <ptang@pivotal.io>
Re: Memory-Bounded Hash Aggregation Pengzhou Tang <ptang@pivotal.io>
Re: Memory-Bounded Hash Aggregation Richard Guo <guofenglinux@gmail.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Melanie Plageman <melanieplageman@gmail.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Peter Geoghegan <pg@bowt.ie>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Adam Lee <ali@pivotal.io>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Peter Geoghegan <pg@bowt.ie>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Peter Geoghegan <pg@bowt.ie>
Re: Memory-Bounded Hash Aggregation Thomas Munro <thomas.munro@gmail.com>
Re: Memory-Bounded Hash Aggregation Heikki Linnakangas <hlinnaka@iki.fi>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Heikki Linnakangas <hlinnaka@iki.fi>
Re: Memory-Bounded Hash Aggregation Peter Geoghegan <pg@bowt.ie>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
Re: Memory-Bounded Hash Aggregation Jeff Davis <pgsql@j-davis.com>
On Wed, 2019-08-28 at 12:52 -0700, Taylor Vesely wrote: > Right now the patch always initializes 32 spill partitions. Have you > given > any thought into how to intelligently pick an optimal number of > partitions yet? Attached a new patch that addresses this. 1. Divide hash table memory used by the number of groups in the hash table to get the average memory used per group. 2. Multiply by the number of groups spilled -- which I pessimistically estimate as the number of tuples spilled -- to get the total amount of memory that we'd like to have to process all spilled tuples at once. 3. Divide the desired amount of memory by work_mem to get the number of partitions we'd like to have such that each partition can be processed in work_mem without spilling. 4. Apply a few sanity checks, fudge factors, and limits. Using this runtime information should be substantially better than using estimates and projections. Additionally, I removed some branches from the common path. I think I still have more work to do there. I also rebased of course, and fixed a few other things. Regards, Jeff Davis
В списке pgsql-hackers по дате отправления