List:General Discussion« Previous MessageNext Message »
From:Jim Faucette Date:May 26 1999 4:45pm
Subject:Re: Is EXPLAIN SELECT ... reliable?
View as plain text  
Robert A. Crawford wrote:
> 
> On Wed, May 26, 1999 at 04:18:23PM +0200, kai@stripped wrote:
> > A index on a single columns will not be used (according to EXPLAIN),
> > nevertheless there is a perfect index for the query. The command
> >   explain select * from Tab2 where ColA=2;
> > (index on ColA) produces the following output:
> >
> > table type    possible_keys   key     key_len ref     rows    Extra
> > Tab2  ALL     ColA    NULL    NULL    NULL    3       where used
> >
> > (I expected  that key would be ColA instead of NULL.)
> >
> > Since the access to the data is fast, I suspect that the index is used,
> > but will not be used by the EXPLAIN command.
> 
>         It is likely the number of rows in the table helps
> the optimizer decide whether or not to use the index. I can't
> confirm this, but I've seen the same thing.
> 

Consider it confirmed! :)

  jim...
Thread
Is EXPLAIN SELECT ... reliable?kai26 May
  • Re: Is EXPLAIN SELECT ... reliable?Robert A. Crawford26 May
  • Re: Is EXPLAIN SELECT ... reliable?Jim Faucette26 May
    • Re: Is EXPLAIN SELECT ... reliable?Robert A. Crawford26 May