why is there extra using where in execution plan of query
- by user366534
I see plan of query:
EXPLAIN SELECT *
FROM `subscribers`
WHERE state =4
AND date_added < '2010-12-23 11:47:45'
It shows:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE subscribers range state_date_added state_date_added 9 NULL 8 Using where
Here is indexes of table:
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
subscribers 0 PRIMARY 1 subscriber_id A 382039 NULL NULL BTREE
subscribers 0 email_list_id 1 email_address A 191019 NULL NULL BTREE
subscribers 0 email_list_id 2 list_id A 382039 NULL NULL BTREE
subscribers 1 FK_list_id 1 list_id A 10 NULL NULL BTREE
subscribers 1 state_date_added 1 state A 12 NULL NULL BTREE
subscribers 1 state_date_added 2 date_added A 8128 NULL NULL BTREE
The last two lines describes index what is supposed for the query.
Why is there in extra column using where?
Even If I fetch only state and date_added column, it has in extra column:
Using where; Using index. I understand why it has using index, but I don't understand Using where here.