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


Subject
Views
Written By
Posted
3187
April 29, 2007 04:13PM
1985
April 29, 2007 10:21PM
2046
April 30, 2007 05:00AM
Re: Need to optimise complex query
2101
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.