Re: query optimization - Mailing list pgsql-general

From Richard Huxton
Subject Re: query optimization
Date
Msg-id 42FCCE35.1010104@archonet.com
Whole thread Raw
In response to query optimization  (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>)
Responses Re: query optimization  (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re:
Next
From: "Adam O'Toole"
Date:
Subject: Re: