Mysql自带profiling性能分析工具_MySQL
程序员文章站
2022-05-27 20:57:55
...
bitsCN.com
Mysql自带profiling性能分析工具
1. show variables like '%profiling%';(查看profiling信息)
2. set profiling=1;(开启profiling)
3. 执行SQL查询
例:select goods_name from ecs_goods where goods_id
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
上一篇: PHP文件下载(考虑到各种格式)
下一篇: cookie的用法详细讲解