pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Glover <mpg4@duluoz.net>
Cc: Bradley Tate <btate@objectmastery.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query problem
Date: Fri, 09 Jan 2004 00:12:07 -0500
Message-ID: <20723.1073625127@sss.pgh.pa.us> (raw)
In-Reply-To: <20040108192716.26c4b369.mpg4@duluoz.net>
References: <3FFCF005.70108@objectmastery.com>
	<20040108192716.26c4b369.mpg4@duluoz.net>

Mike Glover <mpg4@duluoz.net> writes:
> 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). 

7.4 will probably flip over to a hash-based aggregation method, and not
sort at all, once you make sort_mem large enough that it thinks the hash
table will fit in sort_mem.

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <20723.1073625127@sss.pgh.pa.us>
Permalink:  ../20723.1073625127@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20723.1073625127@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, mpg4@duluoz.net, btate@objectmastery.com
  Subject: Re: Slow query problem
  In-Reply-To: <20723.1073625127@sss.pgh.pa.us>

* 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