MySQL Forums
Forum List  »  Optimizer & Parser

Re: Need to optimise complex query
Posted by: KimSeong Loh
Date: April 30, 2007 08:36PM

Don't think it helps.

The Ent table is using type eq_ref now with the PRIMARY key, so the join is very efficient already, only that it has a using where for the Ent.Citycode IN ('xxx','xxx')

If you want, you can try to create an index on (Primary key , Citycode) , maybe this will remove the using where if it can use both part of this index.
Worth trying only if many rows are filtered away with this IN condition.

Options: ReplyQuote

Written By
April 29, 2007 04:13PM
April 29, 2007 10:21PM
April 30, 2007 05:00AM
Re: Need to optimise complex query
April 30, 2007 08:36PM

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.