Home >Database >Mysql Tutorial >Mysql自带profiling性能分析工具使用分享_MySQL

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

WBOY
WBOYOriginal
2016-06-01 13:23:081087browse

bitsCN.com 1. show variables like '%profiling%';(查看profiling信息)    
Mysql自带profiling性能分析工具使用分享_MySQL
 2. set profiling=1;(开启profiling)
Mysql自带profiling性能分析工具使用分享_MySQL
 3. 执行SQL查询 例:select goods_name from ecs_goods where goods_id Mysql自带profiling性能分析工具使用分享_MySQL 4. show profile for query 4;
Mysql自带profiling性能分析工具使用分享_MySQL
 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 bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn