MySQL Forums
Forum List  »  InnoDB

Re: the where condition field after ">=" can use index? is this true?
Posted by: Rick James
Date: August 15, 2015 05:02PM

For
WHERE a > 100 AND b = 200
this index would be better:
INDEX(b, a)

That is because it is more efficient to have the "= constant" column(s) first in the index.

More discussion:
http://mysql.rjweb.org/doc.php/index_cookbook_mysql

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: the where condition field after ">=" can use index? is this true?
797
August 15, 2015 05:02PM


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.