如题。
#索引
alter table test add index `idx`(`discount_amount`,`limit_amount`);
使用了覆盖索引,但还会出现 using where
mysql> explain select discount_amount from test where discount_amount=10 and limit_amount>10;
+----+-------------+-------+-------+------+---------+--------+--------------------------+
| id | select_type | table | type | key | key_len | rows | Extra |
+----+-------------+-------+-------+------+---------+--------+--------------------------+
| 1 | SIMPLE | test | range | idx | 4 | 660750 | Using where; Using index |
+----+-------------+-------+-------+------+---------+--------+--------------------------+
现在有点懵了,使用到 using where 的查询执行流程是怎样的?