Re: key is not used

2003-12-09 Thread Chuck Gadd
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 w

Re: key is not used

2003-12-09 Thread Martijn Tonies
Hi, I'm not saying I fully understand the MySQL optimizer, as I never had to deal with it before... but: Why should it use an index if the statement is returning ALL rows? It might be faster to read them into memory ( 75853 isn't really much ) and sort them there instead of moving the diskhead ba