Mysql 调优2个语句

一、explain 语句

查看语句的执行计划

二、查看具体每一步耗时

 1set profiling=1;
2、执行SQL
3、show profiles; 获取2执行SQL的query_id
4、show profile for query 【3步获取的query_id】 
原文地址:https://www.cnblogs.com/netsa/p/7508516.html