Skip site navigation (1) Skip section navigation (2)

Re: in-memory sorting

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: in-memory sorting
Date: 2010-08-19 06:24:55
Message-ID: AANLkTin_=1HU3gjLV65ZwZpyqUhvM8bu79zU3V6mmUj3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, Aug 18, 2010 at 11:45 PM, Samuel Gendler
<sgendler(at)ideasculptor(dot)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';

In response to

Responses

pgsql-performance by date

Next:From: Samuel GendlerDate: 2010-08-19 06:38:50
Subject: Re: in-memory sorting
Previous:From: Samuel GendlerDate: 2010-08-19 06:14:10
Subject: yet another q

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group