## 查看PROFILING是否开启 SELECT @@profiling; ## 开始会话级别PROFILING SET profiling=1; ## 执行要检查的SQL ## 查看捕获的所有SQL SHOW PROFILES; ## 看看特定SQL的执行信息 SHOW PROFILE CPU,BLOCK IO,SWAPS FOR QUERY 1; ##SHOW PROFILE语法: SHOW PROFILE [type [, type] ... ] [FOR QUERY n] [LIMIT row_count [OFFSET offset]] type: ALL | BLOCK IO | CONTEXT SWITCHES | CPU | IPC | MEMORY | PAGE FAULTS | SOURCE | SWAPS