pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
Cc: pgsql-general@postgresql.org
Subject: Re: query optimization
Date: Fri, 12 Aug 2005 17:28:37 +0100
Message-ID: <42FCCE35.1010104@archonet.com> (raw)
In-Reply-To: <20050812161158.93055.qmail@web32615.mail.mud.yahoo.com>
References: <20050812161158.93055.qmail@web32615.mail.mud.yahoo.com>

marcelo Cortez wrote:
> hi guys
> 
>   i need advice for query optimization,take too long
> time.
>   any coments are welcomed :).

Comment 1 - you'll need to post the output of "EXPLAIN ANALYSE", not 
just EXPLAIN, otherwise people can't see how long it took.

Comment 2 - you provide the definition of one table but there are about 
20 involved in the query.

Comment 3 - likewise for the size of tables.

Comment 4 - you apply a LIMIT without an ORDER BY. Are you sure this is 
what you want?

Comment 5 - you don't show any INDEX definitions, so it's difficult to 
know whether they are being used.

Comment 6 - Do you know about the genetic query optimiser and thq 
geqo_xxx configuration settings?

HTH - come back with the EXPLAIN ANALYSE etc.

--
   Richard Huxton
   Archonet Ltd



view thread (48+ messages)  latest in thread

Message-ID: <42FCCE35.1010104@archonet.com>
Permalink:  ../42FCCE35.1010104@archonet.com/
Also on:    postgresql.org/message-id/42FCCE35.1010104@archonet.com

 · 

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-general@postgresql.org
  Cc: dev@archonet.com, jmdc_marcelo@yahoo.com.ar
  Subject: Re: query optimization
  In-Reply-To: <42FCCE35.1010104@archonet.com>

* 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