在测试mrr的时候,遇到了一个有趣的问题,这个问题已经提交官方bug,官方已经确定是个bug
| bai_test | CREATE TABLE `bai_test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11756 DEFAULT CHARSET=utf8 |
mysql> explain select * from bai_test where num<50 and num>3000000;
+----+-------------+----------+------------+------+---------------+------+---------+------+------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+----------+------------+------+---------------+------+---------+------+------+----------+-------------+
| 1 | SIMPLE | bai_test | NULL | ALL | NULL | NULL | NULL | NULL | 5246 | 11.11 | Using where |
+----+-------------+------