pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Mike Glover <mpg4@duluoz.net>
Cc: Bradley Tate <btate@objectmastery.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query problem
Date: Thu, 8 Jan 2004 22:23:38 -0600
Message-ID: <20040109042338.GD31586@wolff.to> (raw)
In-Reply-To: <20040108192716.26c4b369.mpg4@duluoz.net>
References: <3FFCF005.70108@objectmastery.com>
	<20040108192716.26c4b369.mpg4@duluoz.net>

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.



view thread (11+ messages)  latest in thread

Message-ID: <20040109042338.GD31586@wolff.to>
Permalink:  ../20040109042338.GD31586@wolff.to/
Also on:    postgresql.org/message-id/20040109042338.GD31586@wolff.to

 · 

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: bruno@wolff.to, mpg4@duluoz.net, btate@objectmastery.com
  Subject: Re: Slow query problem
  In-Reply-To: <20040109042338.GD31586@wolff.to>

* 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