mysql not using indexes if select * where a <> 5

2002-02-21 Thread Victoria Reznichenko
Natalino, Thursday, February 21, 2002, 1:46:11 PM, you wrote: NP> Hi, NP> I found that mysql doesn't used indexes if there is a <> in the where NP> statement... NP> for example NP> mysql> explain select * from testtable where id <> 5; NP> +-+--+---+--+-+-

Re: mysql not using indexes if select * where a <> 5

2002-02-21 Thread Georg Richter
On Thursday, 21. February 2002 12:46, Natalino Picone wrote: > Hi, > I found that mysql doesn't used indexes if there is a <> in the where > statement... > for example > mysql> explain select * from testtable where id <> 5; It would only make sense to use an index, when you want to select the id

mysql not using indexes if select * where a <> 5

2002-02-21 Thread Natalino Picone
Hi, I found that mysql doesn't used indexes if there is a <> in the where statement... for example mysql> explain select * from testtable where id <> 5; +-+--+---+--+-+--+---++ | table | type | possible_keys | key | key_len | ref | rows