sql优化

*性能优化

1、select 列名 from table; 

2、where:可参数化支持优化器使用where子句中列上的索引,不可参数化的不支持索引查找

3、使用between... and /exists 代替 in;

4、用>= 代替!<

5、避免在where中使用运算符,如substring('name', 1, 1) = '黄';

6、使用exists 代替 count(*);

posted on 2018-07-13 14:10  莫伊筱筱  阅读(127)  评论(0编辑  收藏  举报