ITPub博客

首页 > IT职业 > IT生活 > Mysql自带profiling性能分析工具使用分享

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

IT生活 作者:kellycdl 时间:2021-09-09 09:30:30 0 删除 编辑

           1. show variables like '%profiling%';(查看profiling信息)    
图片描述
 2. set profiling=1;(开启profiling)
图片描述
 3. 执行SQL查询 例:select goods_name from ecs_goods where goods_id
图片描述 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 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4240/viewspace-2804023/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Python2.x
请登录后发表评论 登录
全部评论

注册时间:2019-08-12

  • 博文量
    82
  • 访问量
    600