pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stef <svb@ucs.co.za>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query kills machine.
Date: Tue, 24 Aug 2004 11:23:31 -0400
Message-ID: <4015.1093361011@sss.pgh.pa.us> (raw)
In-Reply-To: <20040824153014.2a11d228@svb.ucs.co.za>
References: <20040824103240.4d909777@svb.ucs.co.za>
	<412B05A2.8070301@familyhealth.com.au>
	<20040824153014.2a11d228@svb.ucs.co.za>

Stef <svb@ucs.co.za> writes:
> 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.

Not if you haven't got the RAM to support it :-(

Another thing you might look at is ANALYZEing the tables again after
you've loaded all the new data.  The row-count estimates seem way off
in these plans.  You might need to increase the statistics target,
too, to get better plans.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <4015.1093361011@sss.pgh.pa.us>
Permalink:  ../4015.1093361011@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4015.1093361011@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, svb@ucs.co.za
  Subject: Re: Query kills machine.
  In-Reply-To: <4015.1093361011@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