List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:December 9 2003 12:13pm
Subject:Re: update: key is not used
View as plain text  
Corin Langosch <clangosch@stripped> wrote:
> 
> update of my last email sent.
> 
> when i use the
> sql: 'EXPLAIN SELECT datum FROM actions ORDER BY datum'
> 
> the key gets used:
> table  type  possible_keys  key  key_len  ref  rows  Extra
> actions index NULL datum 8 NULL 75859 Using index
> 
> however as soon as i select more column like
> sql: 'EXPLAIN SELECT datum,id FROM actions ORDER BY datum'
> the key isn't used anymore :-(.
> 
> might this be bug of mysql?
> 

No. In the first case MySQL can take all data from the index file. In the second case it
should read data file, too. 



-- 
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
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