MySQL PROFILE 跟踪语句各阶段性能开销(3)

mysql> show profile; mysql> select * from information_schema.profiling; mysql> select * from information_schema.profiling where query_id=6 or mysql> show profile; #默认显示时间信息 mysql> show profile CPU,BLOCK IO; #(时间)加上 CPU,BLOCK IO 使用情况 mysql> show profile for query 6; #query_id=6的(时间)信息 mysql> show profile CPU for query 6; #query_id=6的cpu信息 mysql> show profile CPU limit 6; #前6个状态信息(前6行) mysql> show profile CPU limit 6 offset 2;#第2行起前6个状态信息(前2~7行)

关闭跟踪:

set profiling = 0; 

set profiling_history_size = 0; 

set profiling = 0; set profiling_history_size = 0;


参考: 

SHOW PROFILE Syntax

The INFORMATION_SCHEMA PROFILING Table

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b71c0f9b6fa3e7ebc0895b2462e20a3b.html