有没有任何方法或查询可以捕获 MySQL 服务器中运行查询的资源使用情况
我们可以通过任何查询/方法来捕获运行查询或存储过程的资源使用情况?谁能帮我解决这个问题吗?
any query / method by which we can capture the resource usage for running query or stored procedure? Can anyone help me with this please !?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用一些查询来帮助您监视此情况,例如:
查看正在运行的查询:
mysql> SHOW PROCESSLIST;
查看 MySQL 服务器状态变量,这将为您提供统计性能数据:
mysql>; SHOW SERVER STATUS;
此外,您还可以显示引擎的状态:
mysql>;显示引擎 INNODB 状态;
There are some queries that you can use to help you monitor this, such as:
View Running Queries:
mysql> SHOW PROCESSLIST;
View the MySQL server status variables which will give you statistical performance data:
mysql> SHOW SERVER STATUS;
Also, you can show an engine's status:
mysql> SHOW ENGINE INNODB STATUS;