pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@it.is.rice.edu>
To: Jean-Philippe Cote <jean-philippe.cote@crt.umontreal.ca>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Extremely irregular query performance
Date: Thu, 12 Jan 2006 15:05:50 -0600
Message-ID: <20060112210550.GI81@it.is.rice.edu> (raw)
In-Reply-To: <20060112201353.5C39138409A@crt0.crt.umontreal.ca>
References: <20060112191618.GB81@it.is.rice.edu>
	<20060112201353.5C39138409A@crt0.crt.umontreal.ca>

On Thu, Jan 12, 2006 at 03:23:14PM -0500, Jean-Philippe Cote wrote:
> 
> 
> Can I actully know whether a given plan is excuted with GEQO on ?
> In other words, if I launch 'explain <query>', I'll get a given plan, but if I re-launch
> the <query> (withtout the 'explain' keyword), could I get a different
> plan given that GEQO induces some randomness ?
> 
> >Is it the plan that is different in the fastest case with GEQO or is it
> >the time needed to plan that is causing the GEQO to beat the exhaustive
> >search?
> 
GEQO will be used if the number of joins is over the GEQO limit in
the configuration file. The GEQO process is an iterative random
process to find an query plan. The EXPLAIN results are the plan for that
query, but not neccessarily for subsequent runs. GEQO's advantage is a
much faster plan time than the exhaustive search method normally used.
If the resulting plan time is less than the exhaustive search plan time,
for short queries you can have the GECO run more quickly than the
exhaustive search result. Of course, if you PREPARE the query the plan
time drops out.

Ken



view thread (15+ messages)  latest in thread

Message-ID: <20060112210550.GI81@it.is.rice.edu>
Permalink:  ../20060112210550.GI81@it.is.rice.edu/
Also on:    postgresql.org/message-id/20060112210550.GI81@it.is.rice.edu

 · 

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: ktm@it.is.rice.edu, jean-philippe.cote@crt.umontreal.ca, simon@2ndquadrant.com
  Subject: Re: Extremely irregular query performance
  In-Reply-To: <20060112210550.GI81@it.is.rice.edu>

* 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