pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jean-Philippe Côté <jean-philippe.cote@crt.umontreal.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: Extremely irregular query performance
Date: Wed, 11 Jan 2006 18:03:05 -0500
Message-ID: <28999.1137020585@sss.pgh.pa.us> (raw)
In-Reply-To: <20060111222900.EA357384020@crt0.crt.umontreal.ca>
References: <20060111222900.EA357384020@crt0.crt.umontreal.ca>

=?iso-8859-1?Q?Jean-Philippe_C=F4t=E9?= <jean-philippe.cote@crt.umontreal.ca> writes:
> I'm running version 8.1 on a dedicated Sun v20 server (2 AMD x64's)
> with 4Gb of RAM. I have recently noticed that the performance of
> some more complex queries is extremely variable and irregular.
> For example, I currently have a query that returns a small number 
> of rows (5) by joining a dozen of tables.

A dozen tables?  You're exceeding the geqo_threshold and getting a plan
that has some randomness in it.  You could either increase
geqo_threshold if you can stand the extra planning time, or try
increasing geqo_effort to get it to search a little harder and hopefully
find a passable plan more often.  See

http://www.postgresql.org/docs/8.1/static/geqo.html
http://www.postgresql.org/docs/8.1/static/runtime-config-query.html#RUNTIME-CONFIG-QUERY-GEQO

I'm kinda surprised that you don't get better results with the default
settings.  We could tinker some more with the defaults, if you can
provide evidence about better values ...

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <28999.1137020585@sss.pgh.pa.us>
Permalink:  ../28999.1137020585@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28999.1137020585@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, jean-philippe.cote@crt.umontreal.ca
  Subject: Re: Extremely irregular query performance
  In-Reply-To: <28999.1137020585@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