From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | gryzman(at)gmail(dot)com |
Cc: | pgSQL - General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: sort_mem param of postgresql.conf |
Date: | 2008-11-12 23:08:11 |
Message-ID: | Pine.GSO.4.64.0811121749110.29475@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-11-13 00:24:01 | Re: [GENERAL] Very slow queries w/ NOT IN preparation (seems like a bug, test case) |
Previous Message | Tony Fernandez | 2008-11-12 22:52:07 | ERROR: incompatible library |