show variables like '%profiling%';    查看状态  查看时间去哪了```

  set  profiling=1;// 打开

 

 

show profiles;  查看执行过的sql 语句 

mysql 分析3使用分析sql 性能 show profiles ;

show profile for query 2;   找到第二条为id为2的sql生成查询计划  分析查询状态 分析sql依据 时间花费在那些地方了

mysql 分析3使用分析sql 性能 show profiles ;

时间浪费在了数据传输。

通过 show profile for query 2;找到问题所在。

mysql 分析3使用分析sql 性能 show profiles ;

相关文章:

  • 2021-09-23
  • 2021-04-05
  • 2021-11-17
  • 2021-06-18
  • 2021-07-30
  • 2021-09-09
  • 2021-11-24
  • 2022-02-07
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2022-01-21
  • 2022-01-02
  • 2022-12-23
相关资源
相似解决方案