From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marinos J. Yannikos <mjy@geizhals.at>
Cc: Jeff Trout <jeff@jefftrout.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: optimization ideas for frequent, large(ish) updates
Date: Sun, 15 Feb 2004 22:28:48 -0500
Message-ID: <17527.1076902128@sss.pgh.pa.us> (raw)
In-Reply-To: <4030309B.7090807@geizhals.at>
References: <402C213A.4030105@geizhals.at>
<200402122228.41680.josh@agliodbs.com>
<402ED348.7000800@geizhals.at>
<460CEC02-5FDB-11D8-8142-000D9366F0C4@jefftrout.com>
<4030309B.7090807@geizhals.at>
"Marinos J. Yannikos" <mjy@geizhals.at> writes:
> Jeff Trout wrote:
>> Remember that it is going to allocate 800MB per sort.
> I didn't know that it always allocates the full amount of memory
> specificed in the configuration
It doesn't ... but it could use *up to* that much before starting to
spill to disk. If you are certain your sorts won't use that much,
then you could set the limit lower, hm?
Also keep in mind that sort_mem controls hash table size as well as sort
size. The hashtable code is not nearly as accurate as the sort code
about honoring the specified limit exactly. So you really oughta figure
that you could need some multiple of sort_mem per active backend.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mjy@geizhals.at, jeff@jefftrout.com
Subject: Re: optimization ideas for frequent, large(ish) updates
In-Reply-To: <17527.1076902128@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox