MySQL语句优化(使失效)

1,用explain分析避免全表扫描
2,!=
3,null,可以用0
4,or
5,模糊like
6,in 和 not in 也要慎用,对于连续的数值,能用 between 就不要用 in 了
7,语句中用运算