码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-02-11 23:49:03      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:href   set   count   tab   .net   text   jpg   cpu   select   

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自带profiling性能分析工具使用分享

标签:href   set   count   tab   .net   text   jpg   cpu   select   

原文地址:http://www.cnblogs.com/xingzc/p/6390254.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!