MySQL Forums
Forum List  »  Performance

Re: Help optimizing a query
Posted by: Mike Hillyer
Date: October 25, 2004 10:50AM

Well why even use a subquery?

SELECT adresse
FROM tblcourriel, tblcontactinfo, tblcontactcontactinfo, tblinscription, tblactivite
WHERE tblcourriel.id = tblcontactinfo.reference
AND tblcontactinto.type = 2
AND tblcontactinfo.id = tblcontactcontactinfo.contactinfo
AND tblcontactcontactinfo.contact = tblinscription.participant
AND tblinscription.activite = tblactivite.id
AND tblactivite.nom like '%g05%'

That should produce the same results, you may want to check its performance.

Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535

Blog: http://www.openwin.org/mike

"The Open Source movement has become a major force across the software industry, and MySQL is the world's most popular open source database."
--Fortune Magazine

Options: ReplyQuote


Subject
Views
Written By
Posted
3496
m p
October 22, 2004 08:56AM
Re: Help optimizing a query
2411
October 25, 2004 10:50AM
2329
m p
November 03, 2004 12:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.