您的位置:首页 > 博客中心 > 数据库 >

Mysql Profiling

时间:2022-03-13 23:00

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

热门排行

今日推荐

热门手游