关于SQL优化的小知识
负向查询不命中索引
不命中
select account from user where id not in (1,2,3);
命中
select account from user where id in (4,5,6);
前置模糊查询不命中索引
不命中
select account from user where name like '%lufei'
命中
select account ...
原创
2019-02-20 14:06:53 ·
79 阅读 ·
0 评论