| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: query optimization |
| Date: | 2005-08-12 16:28:37 |
| Message-ID: | 42FCCE35.1010104@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adam O'Toole | 2005-08-12 17:23:32 | Re: |
| Previous Message | Kretschmer Andreas | 2005-08-12 16:25:42 | Re: [despammed] |