MySQL Forums
Forum List  »  Newbie

Re: query problem..
Posted by: Baris Cicek
Date: July 30, 2005 06:51AM

Have you ever tried using `explain <i>query</i>` to see if there're indexes that mysql does not use.

That kind of queries directly related with the indexes you got on tables. And another note is, why do you use left join, instead of direct joining. Using left join make you increase records with cartesian multiply which is 5000*11000*11000*10000. Insted use direct join and indexes.

Also think about dividing query into two that way you can see what kind of index you can use on each query.

if you can paste explain output of the query and index status of tables (show create table) I can help you a little more.

Options: ReplyQuote


Subject
Written By
Posted
July 30, 2005 12:52AM
Re: query problem..
July 30, 2005 06:51AM
July 30, 2005 07:58AM
July 30, 2005 11:20AM


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.