MySQL Forums
Forum List  »  Performance

Re: Optimize complex query with arithmetic calculations
Posted by: KimSeong Loh
Date: June 04, 2005 07:37AM

where col1 = xyz
where col2 = xyz
where col3 = xyz
where col4 = xyz
where col1 = xyz and col3 = abc
where col2 = xyz and col3 = abc


Index for the above should be
(col1, col3)
(col2, col3)
(col3)
(col4)

No need (col1) and (col2)

Options: ReplyQuote




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.