pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Ron <rjpeace@earthlink.net>
Cc: Guy Rouillier <guyr-ml1@burntmail.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: High update activity, PostgreSQL vs BigDBMS
Date: Tue, 02 Jan 2007 10:36:47 -0800
Message-ID: <1167763007.14243.18.camel@dogma.v10.wvs> (raw)
In-Reply-To: <E1H0HFH-0004cw-6E@elasmtp-dupuy.atl.sa.earthlink.net>
References: <45935A49.6080602@burntmail.com>
	<E1H0HFH-0004cw-6E@elasmtp-dupuy.atl.sa.earthlink.net>

On Fri, 2006-12-29 at 07:52 -0500, Ron wrote:
> A= go through each query and see what work_mem needs to be for that 
> query to be as RAM resident as possible.  If you have enough RAM, set 
> work_mem for that query that large.  Remember that work_mem is =per 
> query=, so queries running in parallel eat the sum of each of their work_mem's.

Just to clarify, from the docs on work_mem at
http://www.postgresql.org/docs/current/static/runtime-config-
resource.html :

"Specifies the amount of memory to be used by internal sort operations
and hash tables before switching to temporary disk files. The value is
specified in kilobytes, and defaults to 1024 kilobytes (1 MB). Note that
for a complex query, several sort or hash operations might be running in
parallel; each one will be allowed to use as much memory as this value
specifies before it starts to put data into temporary files. Also,
several running sessions could be doing such operations concurrently. So
the total memory used could be many times the value of work_mem; it is
necessary to keep this fact in mind when choosing the value. Sort
operations are used for ORDER BY, DISTINCT, and merge joins. Hash tables
are used in hash joins, hash-based aggregation, and hash-based
processing of IN subqueries."

Regards,
	Jeff Davis




view thread (39+ messages)  latest in thread

Message-ID: <1167763007.14243.18.camel@dogma.v10.wvs>
Permalink:  ../1167763007.14243.18.camel@dogma.v10.wvs/
Also on:    postgresql.org/message-id/1167763007.14243.18.camel@dogma.v10.wvs

 · 

reply

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: pgsql@j-davis.com, rjpeace@earthlink.net, guyr-ml1@burntmail.com
  Subject: Re: High update activity, PostgreSQL vs BigDBMS
  In-Reply-To: <1167763007.14243.18.camel@dogma.v10.wvs>

* 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