Hi,
Got a bit of a weird one here :/
With this query:
... it comes up with the following "key" set:
...as you can see, its coming up with the wrong index - processed_text_ad_id (this one is totally different, it holds "click_processed" and "client_click_text_ad_id_fk")
I definatly have the index set:
date_click_processed INDEX client_click_date, click_processed, client_click_time
Can anyone see what I'm doing wrong?
TIA
Andy
Got a bit of a weird one here :/
With this query:
Code:
EXPLAIN SELECT *
FROM Clients_Stats_Per_Click
WHERE (
client_click_date <=20100730
AND client_click_date >=20100713
)
AND click_processed =1
ORDER BY client_click_time DESC , client_click_date DESC , click_processed DESC
LIMIT 0 , 25
... it comes up with the following "key" set:
Code:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Clients_Stats_Per_Click ref processed_text_ad_id,click_date_processed_detail_i... processed_text_ad_id 4 const 30 Using where; Using filesort
...as you can see, its coming up with the wrong index - processed_text_ad_id (this one is totally different, it holds "click_processed" and "client_click_text_ad_id_fk")
I definatly have the index set:
date_click_processed INDEX client_click_date, click_processed, client_click_time
Can anyone see what I'm doing wrong?
TIA
Andy