List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:February 8 2000 3:42pm
Subject:Re: Index with SELECT problem.
View as plain text  
Arion writes:
 > I have a table:
<cut>
 > Why the query won't use the index?
 > mysql> explain select *
 >     -> from  book_reserve
 >     -> where book_id =1 and mark='Reserve';
 >
+--------------+------+---------------------------+------+---------+------+------+------------+
 > 
 > | table        | type | possible_keys             | key  | key_len |
 > ref  | rows | Extra      |
 >
+--------------+------+---------------------------+------+---------+------+------+------------+
 > 
 > | book_reserve | ALL  | book_reserve_book_id_mark | NULL |    NULL |
 > NULL |    6 | where used |
 >
+--------------+------+---------------------------+------+---------+------+------+------------+
 > 
 > Thanks
 > 
 > Arion

Hi!

Because your table is very small. How big is it anyway ??

Regards,

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
Index with SELECT problem.Arion8 Feb
  • Re: Index with SELECT problem.sinisa8 Feb