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

Re: Query kills machine.

From: "Magnus Naeslund(pg)" <mag-pg(at)fbab(dot)net>
To: Stef <svb(at)ucs(dot)co(dot)za>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query kills machine.
Date: 2004-08-24 14:15:06
Message-ID: 412B4D6A.8050706@fbab.net (view raw or flat)
Thread:
Lists: pgsql-performance
Stef wrote:

 > Christopher Kings-Lynne mentioned :
 > => sort_mem = 4096
 >
 > Reducing sort_mem to 4096 seems to make it run in a reasonable time
 > again. Any idea why? The database does a whole lot of huge sorts
 > every day, so I thought upping this parameter would help.
 >
 > A couple of queries do seem to run slower now that I reduced
 > the sort_mem.
 > The shared buffers still makes a significant difference when I 
increase it.
 >

Well you have to take in account that sort_mem is not the total memory 
allocated for sorting but per connection and in complex expressions 
serveral times that too.

So if you sort a lot it can push your operating system off the cliff and 
it might start reaping things that shouldn't be reaped and start swapping.

If that happens _everything_ on that box will get slow...

Shared buffers on the other hand is only allocated once.

Regards,
Magnus


In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2004-08-24 15:23:31
Subject: Re: Query kills machine.
Previous:From: Magnus Naeslund(t)Date: 2004-08-24 14:08:33
Subject: Re: Query kills machine.

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