Re: sort_mem param of postgresql.conf - Mailing list pgsql-general

From Greg Smith
Subject Re: sort_mem param of postgresql.conf
Date
Msg-id Pine.GSO.4.64.0811121749110.29475@westnet.com
Whole thread Raw
In response to Re: sort_mem param of postgresql.conf  ("Grzegorz Jaśkiewicz" <gryzman@gmail.com>)
Responses Re: sort_mem param of postgresql.conf
List pgsql-general
On Wed, 12 Nov 2008, Grzegorz Ja�~[kiewicz wrote:

> that's on 8.3, by default there was no sort_mem , I hadded it , changed it
> to 512MB and all of the sudent everything started to fly - wherever it
> required hudge ammounts of memory for queries. The queries are reports, so
> they basicaly join few tables, and dump all ofthat content - so it takes a
> bit of a memory to do it ;)

Be advised that the work_mem setting (and its deprecated alias sort_mem)
are on a per-client basis.  So if you have a bunch of people running
reports with that setting, you might discover your server running out of
memory; that's a really high setting.  Generally, if it's only a report or
two that need a lot more working memory for sorts, you can do this at the
beginning of them instead:

set work_mem='512MB';

Which will set the value only for that session.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: brian
Date:
Subject: Re: simple COPY FROM issue
Next
From: Guy Rouillier
Date:
Subject: Re: Upgrading side by side in Gentoo