From: Andy Colson <andy@squeakycode.net>
To: sthomas@peak6.com
Cc: Robert Schnabel <schnabelr@missouri.edu>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Allow sorts to use more available memory
Date: Mon, 12 Sep 2011 13:02:44 -0500
Message-ID: <4E6E4944.1010800@squeakycode.net> (raw)
In-Reply-To: <4E6E4826.8050002@peak6.com>
References: <4E6E426D.7060405@missouri.edu>
<4E6E45CA.20606@squeakycode.net>
<4E6E4826.8050002@peak6.com>
On 9/12/2011 12:57 PM, Shaun Thomas wrote:
> On 09/12/2011 12:47 PM, Andy Colson wrote:
>
>> work_mem is not the total a query can use. I believe each step can
>> use that much, and each backend can use it for multiple bits. So if
>> you had two backends, each doing 2 sorts, you'd use 2*2 = 4 * 2GB =
>> 8GB.
>
> Exactly. Find a big query somewhere in your system. Use EXPLAIN to
> examine it.
Yeah, and even better, on PG 9, if you EXPLAIN ANALYZE it'll show you
just how much memory is actually being used.
-Andy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andy@squeakycode.net, sthomas@peak6.com, schnabelr@missouri.edu
Subject: Re: Allow sorts to use more available memory
In-Reply-To: <4E6E4944.1010800@squeakycode.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox