1.故障重现。
2.开启慢查询日志
3.explain 分析sql
一般第三步就能对99%的sql进行优化了。
4.show profile
5.找运维经理 mysql服务器参数调优
全局查询日志(只能测试环境用)