Re: need help with a query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Velikhov <pvelikhov(at)yahoo(dot)com>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: need help with a query
Date: 2007-10-19 16:34:01
Message-ID: 12689.1192811641@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Pavel Velikhov <pvelikhov(at)yahoo(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2007-10-19 18:21:26 Re: how to improve the performance of creating index
Previous Message Pavel Velikhov 2007-10-19 16:11:36 Re: need help with a query