mysql索引失效
1. 模糊匹配查询 通配符字符串 %多个任意字符,%在条件左侧select * from user where id like '%4567';2.尽量避免使用or or的条件如果没有索引 采用全表扫描3.在有索引的列上进行计算会导致索引失效select * from user where id+1=123456;4.使用is null 或者is not null 导致索引失效select * from user where id is not null;5.使用!= 或者 <&g
原创
2021-05-10 11:28:06 ·
146 阅读 ·
0 评论