Re: Slow query problem

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mike Glover <mpg4(at)duluoz(dot)net>
Cc: Bradley Tate <btate(at)objectmastery(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow query problem
Date: 2004-01-09 04:23:38
Message-ID: 20040109042338.GD31586@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Jan 08, 2004 at 19:27:16 -0800,
Mike Glover <mpg4(at)duluoz(dot)net> wrote:
>
> You should bump sort_mem as high as you can stand. with only 8MB sort
> memory available, you're swapping intermediate sort pages to disk --
> a lot. Try the query with sort_mem set to 75MB (to do the entire sort in
> memory).

Postgres also might be able to switch to a hash aggregate instead of
using a sort if sortmem is made large enough to hold the results for
all of the (estimated) groups.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-01-09 05:12:07 Re: Slow query problem
Previous Message Seum-Lim Gan 2004-01-09 04:19:53 PostgreSQL vs. Oracle disk space usage