1、开启和关闭
mysql> set profiling=1;
mysql> set profiling=0; 

mysql记录sql执行时间

information_schema 的 database 会建立一个PROFILING 的 table 记录. 
2、执行一些语句(自定义语句)
mysql>select * from navigation_sub where navPId<6 and navSName='公司介绍';

mysql记录sql执行时间
3、查询语句执行时间
mysql>show profiles;
mysql记录sql执行时间

 

 

扩展:

  mysql查询性能分析(show status,show profile,explain):http://blog.csdn.net/wwwbbb8510/article/details/7593729/

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-10-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案