Calliphoridae (pkbarbiedoll) wrote in mysql,
Calliphoridae
pkbarbiedoll
mysql

Is ref: NULL bad?

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
  • Post a new comment

    Error

    default userpic
  • 2 comments