1. show variables like '%profiling%'; (查看profiling信息)

Mysql自带profiling性能分析工具

 

2. set profiling=1; (开启profiling)

Mysql自带profiling性能分析工具

 

3. 执行SQL查询 例:select goods_name from ecs_goods where goods_id <5000;


show  profiles;

Mysql自带profiling性能分析工具 

 

4. show profile for query 4;

Mysql自带profiling性能分析工具

  

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

相关文章:

  • 2022-12-23
  • 2021-06-02
  • 2021-12-12
  • 2022-12-23
  • 2021-07-19
  • 2021-05-21
  • 2021-05-24
  • 2021-05-18
猜你喜欢
  • 2021-08-13
  • 2021-10-01
  • 2021-05-30
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案