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
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend