List:General Discussion« Previous MessageNext Message »
From:Chuck Gadd Date:December 9 2003 9:44am
Subject:Re: key is not used
View as plain text  
Corin Langosch wrote:

> Hello,
> 
> thanks for your fast reply. even when i use
> EXPLAIN SELECT * FROM `actions` ORDER BY datum LIMIT 10
> the key isn't used. the query takes about 2s :-(


What does it show if you do a

show indexes from actions

-----------------------

If you are sure the optimizer is wrong, you can FORCE it
to use an index.

The USE INDEX option only suggests an index to mysql.

SELECT * FROM actions FORCE INDEX (datum) ORDER BY datum

And see if it makes a speed difference.  Most often, if MySql
didn't use it, then it won't help but I'm sure it can be wrong
once in a while.



Thread
key is not usedCorin Langosch9 Dec
  • Re: key is not usedMartijn Tonies9 Dec
    • Re[2]: key is not usedCorin Langosch9 Dec
      • Re: key is not usedChuck Gadd9 Dec
  • update: key is not usedCorin Langosch9 Dec
    • Re: update: key is not usedEgor Egorov9 Dec
  • Re: Re[2]: key is not usedMartijn Tonies9 Dec