mysql
什么叫覆盖索引?
❒ 覆盖索引是指查询使用了索引,并且需要返回的列,在该索引中已经全部能够找到 判断测试: 条件:id为主键,默认是主键索引;名称字段为普通索引。 ✔ select * from tb user where id = 1 (覆盖索引) ✔ select id, name from tb user where name = 'Arm' (覆盖索引) ✔ select id,name, gender from tb user where name = 'Arm' (非覆盖索引,需要回表査询)
✔ 覆盖索引是指查询使用了索引,并且需要返回的列,在该索引中已经全部能够找到。