/* 性能分析工具(profiler)*/
/* 查看 profiling 是否开启 */
select @@profiling;
/* 开启 profiling */
set profiling=1;
/* 执行一个 SQL 查询 */
...
/* 查看当前会话所产生的所有 profiles */
show profiles;
/* 获取上一次查询的执行时间 */
show profile;
/* 查询指定的 Query ID */
show profile for query 2;
/* 查看 MySQL 的版本情况 */
select version()
MySQL performance analysis tool
Guess you like
Origin www.cnblogs.com/clipboard/p/12685169.html
Recommended
Ranking