"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 Ward | 26 May |
| • Re: Index Question? | Egor Egorov | 27 May |