Skip site navigation (1) Skip section navigation (2)

Re: Slow query problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 05:12:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Mike Glover <mpg4(at)duluoz(dot)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

In response to

pgsql-performance by date

Next:From: Dennis BjörklundDate: 2004-01-09 07:29:57
Subject: Re: Slow query problem
Previous:From: Bruno Wolff IIIDate: 2004-01-09 04:23:38
Subject: Re: Slow query problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group