源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2021-01-15 23:09 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Mysql自带profiling性能分析工具使用分享
1. show variables like '%profiling%';(查看profiling信息)    
[img]http://files.jb51.net/file_images/article/201211/201211112154026.jpg[/img]  
2. set profiling=1;(开启profiling)
[img]http://files.jb51.net/file_images/article/201211/201211112154027.jpg[/img]  
3. 执行SQL查询 
例:select goods_name from ecs_goods where goods_id <5000;
 
show  profiles;
[img]http://files.jb51.net/file_images/article/201211/201211112154028.jpg[/img]
 
4. show profile for query 4;
[img]http://files.jb51.net/file_images/article/201211/201211112154029.jpg[/img]  
[b]show profile 的格式如下: [/b]
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 
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部