Mysql自带profiling性能分析工具使用分享
更新时间:2012年11月11日 22:17:44 作者:
Mysql自带profiling性能分析工具使用分享,需要的朋友可以参考下
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
相关文章
MySQL安装过程中在第四步initializing database出错的解决方法
安装mysql时,在第四步一直卡住了显示失败,文中通过图文介绍的解决方法非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望能帮助到大家2023-09-09
mysql Out of memory (Needed 16777224 bytes)的错误解决
至于我改的这几个值是不是正确的解决方法,目前还不知道。先贴出来2012-07-07


最新评论