Re: need help with a query - Mailing list pgsql-performance

From Tom Lane
Subject Re: need help with a query
Date
Msg-id 12689.1192811641@sss.pgh.pa.us
Whole thread Raw
In response to Re: need help with a query  (Pavel Velikhov <pvelikhov@yahoo.com>)
List pgsql-performance
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
usingboth 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

pgsql-performance by date:

Previous
From: Pavel Velikhov
Date:
Subject: Re: need help with a query
Next
From: "Scott Marlowe"
Date:
Subject: Re: how to improve the performance of creating index