-- 查看是否开启 show variables like "%profiling%";
-- 查看是否支持 show profile yes表示支持 no表示不支持 select @@have_profiling;
-- 查看是否开启 1:开启了 0:未开启 默认为0 select @@profiling
-- 开启命令 set profiling = 1
-- 查看最近15条的查询记录 show profiles
-- 根据query ID 查询分析 show profile cpu,block io for query 87;
-- 关闭profile set profiling=off;
|