当前位置: 移动技术网 > IT编程>数据库>Mysql > Mysql自带profiling性能分析工具使用分享

Mysql自带profiling性能分析工具使用分享

2017年12月12日  | 移动技术网IT编程  | 我要评论

java反编译工具,软件培训,昆明火车站暴徒照片

1. show variables like '%profiling%';(查看profiling信息)    


 
2. set profiling=1;(开启profiling)


 
3. 执行sql查询 
例:select goods_name from ecs_goods where goods_id <5000;
 
show  profiles;

 
4. show profile for query 4;


 
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 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网