Re: Allow sorts to use more available memory - Mailing list pgsql-performance

From Andy Colson
Subject Re: Allow sorts to use more available memory
Date
Msg-id 4E6E4944.1010800@squeakycode.net
Whole thread Raw
In response to Re: Allow sorts to use more available memory  (Shaun Thomas <sthomas@peak6.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Shaun Thomas
Date:
Subject: Re: Allow sorts to use more available memory
Next
From: Robert Schnabel
Date:
Subject: Re: Allow sorts to use more available memory