MySQL Forums
Forum List  »  InnoDB

Re: Minimize locking on UPDATE with multiple WHERE columns
Posted by: Noha Taha
Date: April 05, 2013 07:32PM

I thought the left most column in the index has to match the leftmost one in the WHERE condition:
http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html
The output of "explain" for an equivalent select statement states index(col1), index(col2), index(col2 and col1) as possible_keys and index on (col2) (the first column in the WHERE condition) as the "key". Really confusing!
Thank you so much for your help!

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.