Re: Slow query problem - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Slow query problem
Date
Msg-id 20040109042338.GD31586@wolff.to
Whole thread Raw
In response to Re: Slow query problem  (Mike Glover <mpg4@duluoz.net>)
List pgsql-performance
On Thu, Jan 08, 2004 at 19:27:16 -0800,
  Mike Glover <mpg4@duluoz.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.

pgsql-performance by date:

Previous
From: Seum-Lim Gan
Date:
Subject: PostgreSQL vs. Oracle disk space usage
Next
From: Tom Lane
Date:
Subject: Re: Slow query problem