Re: Partitions and work_mem? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Partitions and work_mem?
Date
Msg-id 543EAAA2.8010701@agliodbs.com
Whole thread Raw
In response to Partitions and work_mem?  (Dave Johansen <davejohansen@gmail.com>)
Responses Re: Partitions and work_mem?
List pgsql-performance
On 10/14/2014 10:08 AM, Dave Johansen wrote:
> I'm running Postgres 8.4 on RHEL 6 64-bit and I had a question about how
> work_mem and partitions interact.
>
> https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server#work_mem
> The above wiki states that "if a query involves doing merge sorts of 8
> tables, that requires 8 times work_mem." If I have a table that is
> partitioned does each partition count as a "table" and get its on work_mem?

In theory, this could happen.  In practice, based on tests I did at Sun
with DBT3 and 8.3, no backend ever used more than 3X work_mem.  This is
partly because the level of parallelism in postgres is extremely
limited, so we can't actually sort 8 partitions at the same time.

BTW, 8.4 is EOL.  Maybe time to upgrade?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Partitions and work_mem?
Next
From: Josh Berkus
Date:
Subject: Re: Yet another abort-early plan disaster on 9.3