pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Velikhov <pvelikhov@yahoo.com>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: need help with a query
Date: Fri, 19 Oct 2007 12:34:01 -0400
Message-ID: <12689.1192811641@sss.pgh.pa.us> (raw)
In-Reply-To: <499575.37238.qm@web56407.mail.re3.yahoo.com>
References: <499575.37238.qm@web56407.mail.re3.yahoo.com>

Pavel Velikhov <pvelikhov@yahoo.com> writes:
> Got a very different query plan this time, with a hash join between links and articles. At least now postgres is using both shared memory buffers and working mem, but its still completely IO bound, only getting in 5-6% CPU once in a while. I guess I can't squeeze more out of the laptop, but I also have a machine with 16GB RAM that I'll try this on next. Should I allocate tons of memory into shared buffers or into the working memory?

For a hash join, I think you want to raise work_mem as high as you can
(without driving the system into swapping).  It won't read any block of
the tables more than once, so there's no point in having lots of
buffers.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <12689.1192811641@sss.pgh.pa.us>
Permalink:  ../12689.1192811641@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12689.1192811641@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pvelikhov@yahoo.com, jonah.harris@gmail.com
  Subject: Re: need help with a query
  In-Reply-To: <12689.1192811641@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