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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

  2020-12-15 我要评论
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 

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们