MySQL Forums
Forum List  »  Performance

Re: in (id_1,id_2, ...) or more select statements or
Posted by: matthew crowley
Date: December 10, 2004 08:22AM

Steven Chan wrote:
> Just another quick question, but does MySQL use
> indexes if you use in('value_1','value_2') and the
> values are constants?
> Thanks in advance.

Try running explain on your query. There is no reason why it shouldn't use the index. You can also try providing a hint in the form of

select * from TABLE use index (INDEX) where X>Y . . .

Options: ReplyQuote

Written By
Re: in (id_1,id_2, ...) or more select statements or
December 10, 2004 08:22AM

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.