List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:May 27 2003 8:36am
Subject:Re: Index Question?
View as plain text  
"Anthony Ward" <awards@stripped> wrote:
> I read at MySQL.com that the table will not use the index if in the query
> statment there is the use of 'OR'
> ie.
> SELECT * FROM table WHERE number = 1 or number = 2 .
> 
> Is that true??

Nope, it's not true.

MySQL will not use index in queries like

SELECT .. FROM table WHERE index1='some_value1' or index2='some_value2'



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
Index Question?Anthony Ward26 May
  • Re: Index Question?Egor Egorov27 May