Getting MySQL to use my index in a query with a range of values
Hello everyone,
I know this question must have been asked a million times over, but I
would be enormously gracious for any pointer in the right direction.
I'd like MySQL to use my index on `playing_date` in this query. Any ideas?
SELECT `repr_id` FROM shows_ottin WHERE `playing_date`>='2008-12-5'
AND `playing_date`<='2008-12-12'
The index is ignored thus:
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: shows_ottin
type: ALL
possible_keys: model_key,date
key: NULL
key_len: NULL
ref: NULL
rows: 1534
Extra: Using where
1 row in set (0.00 sec)
Thank you for any help.
- Forums: