> E.g. the non-equivalence operator is the same. MySQL will use indexes
> for "foo>0", but not "foo<>0", which ask for the same result (presumed
> foo is an unsigned column).
Perhaps I was a bit unclear... Using "foo > 0" does *NOT* use an index.
Using "foo > 0 AND foo < somevalue" *DOES* use an
At 03:11 PM 6/8/2002 +0200, Benjamin Pflugmann wrote:
>Hi.
>
>As far as I can see is that you use a condition in your WHERE clause
>which MySQL will not (yet?) use indexes for. See
>
> http://www.mysql.com/doc/M/y/MySQL_indexes.html
> (seems to be mainly about MyISAM tables)
>
>to see how inde
Hi.
As far as I can see is that you use a condition in your WHERE clause
which MySQL will not (yet?) use indexes for. See
http://www.mysql.com/doc/M/y/MySQL_indexes.html
(seems to be mainly about MyISAM tables)
to see how indexes are used. You use "IS NOT NULL". This page states
nowhere th
> * Mysql, after reading the query, decides wether using an index would be
> better than just a table row scan. Hence, it's MySql's decision
MySQL is making the wrong decision. As stated below, it's doing a table
scan when it only needs to look at some 2,800 rows out of 970,000 rows. In
addit
* Mysql, after reading the query, decides wether using an index would be
better than just a table row scan. Hence, it's MySql's decision
* You can force MySql to use indexes using the 'using index' option with the
select query.(MySql 'might' still reject the force, not sure of the
circumstances)
Jon,
Have you tried phrasing your WHERE clause as
WHERE sequence_log_id >= 0 ?
If there is a determinate lower bound other than zero, then substitute it
for 0 as the second comparand.
Let us know how it comes out.
(And however it comes out, don't ask me why. The real experts can sort