Mysql 优化

1、优化group by 语句

    如果查询包含group by 但是用户想避免排序结果的损耗,则可以使用order by null来禁止排序

Mysql > explain select * from temp group by cls order by null;

2、优化嵌套查询

  尽量避免使用嵌套查询,多使用链接查询。

原文地址:https://www.cnblogs.com/EasonSun/p/3202634.html