How can get my index work when i query using Between command?
when i explain the query:
explain select * from table where Date between date1 and date2;
the return actual key be used is NULL
, how to used my index in this case?
I have read some documentation from MYSQL, they said BTree index should be used here in order for > < or between query, however it doesnt work in my case.
Pls help
EDIT
explain select * from table where Date between '2010-05-10 00:00:00' and '2010-06-10 00:00:00';
+----+-------------+--------+------+---------------+------+---------+------+--------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------+------+---------------+------+---------+------+--------+-------------+
| 1 | SIMPLE | table| ALL | date_index | NULL | NULL | NULL | 109024 | Using where |
+----+-------------+--------+------+---------------+------+---------+------+--------+-------------+