Search Postgresql Archives

Re: work_mem greater than 2GB issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wickro <robwickert@xxxxxxxxx> writes:
> So this is a planning mistake? Should a hash be allowed to grow larger
> than work_mem before it starts to use the disk?

HashAggregate doesn't have any ability to spill to disk.  The planner
will not select a HashAggregate if it thinks the required hash table
would be larger than work_mem.  What you've evidently got here is a
misestimate of the required hash table size, which most likely is
stemming from a bad estimate of the number of groups.  How does that
estimate (12617088 here) compare to reality?  Have you tried increasing
the statistics target for partner_id and keyword (or the whole table)?

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux