Home > Database > Mysql Tutorial > body text

Mysql自带profiling性能分析工具_MySQL

WBOY
Release: 2016-06-01 13:38:44
Original
1013 people have browsed it

bitsCN.com


Mysql自带profiling性能分析工具

 

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

 

show  profiles;


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
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template