Re: in-memory sorting - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: in-memory sorting
Date
Msg-id AANLkTin_=1HU3gjLV65ZwZpyqUhvM8bu79zU3V6mmUj3@mail.gmail.com
Whole thread Raw
In response to Re: in-memory sorting  (Samuel Gendler <sgendler@ideasculptor.com>)
Responses Re: in-memory sorting
List pgsql-performance
On Wed, Aug 18, 2010 at 11:45 PM, Samuel Gendler
<sgendler@ideasculptor.com> wrote:
> Answered my own question.  Cranking work_mem up to 350MB revealed that
> the in-memory sort requires more memory than the disk sort.

Note that unless you run VERY few client connections, it's usually
better to leave work_mem somewhere in the 1 to 32Meg range and have
the connection or user or database that needs 350Meg be set there.

I.e.

<connect>
set work_mem='512MB';
<execute query

OR

alter user memoryhog set work_mem='512MB';

OR

alter database memhogdb set work_mem='512MB';

pgsql-performance by date:

Previous
From: Samuel Gendler
Date:
Subject: yet another q
Next
From: Samuel Gendler
Date:
Subject: Re: in-memory sorting