优化方向:
1,索引
2,表结构
3,系统配置
4,服务器性能
sql字段 执行顺序:
from on jion where groupby having select distinct orderby limit;
使用索引:
1,where中的 字段前不要加模糊查询
2,where中的 表达式左侧不要使用函数表达式
3,不要使用 1=1 查询
4,不要使用nulll查询
5,不要使用 不等于 <> !=
6,不要用 or 可以用union
优化方向:
1,索引
2,表结构
3,系统配置
4,服务器性能
sql字段 执行顺序:
from on jion where groupby having select distinct orderby limit;
使用索引:
1,where中的 字段前不要加模糊查询
2,where中的 表达式左侧不要使用函数表达式
3,不要使用 1=1 查询
4,不要使用nulll查询
5,不要使用 不等于 <> !=
6,不要用 or 可以用union