mysql> EXPLAIN SELECT parent_id FROM `fk_chosen_index_bug_1201443`.`child` FORCE INDEX (parent_id) WHERE parent_id=1 OR parent_id<>1\G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: child
type: range
possible_keys: parent_id
key: parent_id
key_len: 0
ref: NULL
rows: 5233
Extra: Using where; Using index
1 row in set (0.01 sec)
mysql> EXPLAIN SELECT parent_id FROM `fk_chosen_index_bug_1201443`.`child` FORCE INDEX (parent_id) WHERE parent_id=1\G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: child
type: ref
possible_keys: parent_id
key: parent_id
key_len: 4
ref: const
rows: 5233
Extra: Using index
1 row in set (0.00 sec)
mysql> EXPLAIN SELECT parent_id FROM `fk_chosen_ index_bug_ 1201443` .`child` FORCE INDEX (parent_id) WHERE parent_id=1 OR parent_id<>1\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
id: 1
select_type: SIMPLE
table: child
type: range
possible_keys: parent_id
key: parent_id
key_len: 0
ref: NULL
rows: 5233
Extra: Using where; Using index
1 row in set (0.01 sec)
mysql> EXPLAIN SELECT parent_id FROM `fk_chosen_ index_bug_ 1201443` .`child` FORCE INDEX (parent_id) WHERE parent_id=1\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
id: 1
select_type: SIMPLE
table: child
type: ref
possible_keys: parent_id
key: parent_id
key_len: 4
ref: const
rows: 5233
Extra: Using index
1 row in set (0.00 sec)