Is ref: NULL bad?
Date: 06/23/09
(MySQL Communtiy) Keywords: mysql, sql
In the EXPLAIN below, is ref: NULL a bad thing?
mysql> explain SELECT * FROM mytable WHERE item_id='09N1320347' AND value_id IN (2,3,4,5,6,7,8,9);
+----+-------------+------------------------+-------+---------------+-------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------------------+-------+---------------+-------+---------+------+------+-------------+
| 1 | SIMPLE | mytable | range | PRIMARY,item_id | item_id | 18 | NULL | 6 | Using where |
+----+-------------+------------------------+-------+---------------+-------+---------+------+------+-------------+
1 row in set (0.00 sec)
Indexes:
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 2240917 item_id, color_id
item_id INDEX 93371 item_id, value_id
Source: https://mysql.livejournal.com/135843.html