简体   繁体   English

如何计算在mysql工作台中一天执行的事务?

[英]How can i count transactions executed in a day in mysql workbench?

I just want to learn how to count queries executed in a day on mysql workbench. 我只想学习如何计算一天在mysql工作台上执行的查询。 THANKS 谢谢

There's things like SHOW ENGINE InnoDB STATUS which gives you a staggering amount of detail and insight into the engine, but there's a summary near the bottom that looks like this: 诸如SHOW ENGINE InnoDB STATUS之类的东西为您提供了惊人的引擎细节和洞察力,但是底部附近有一个摘要,如下所示:

Number of rows inserted 67871639, updated 554629050, deleted 65687644, read 1072151182312

That might be what you're looking for. 那可能就是您要寻找的。

The alternative to that is the general query log, but that can quickly exhaust your disk space if not rotated. 替代方法是常规查询日志,但是如果不旋转,它可以快速耗尽磁盘空间。

Update : There's also this: 更新 :还有这个:

SHOW GLOBAL STATUS LIKE "Questions";

That's the number of queries run, but isn't broken out by type. 这是运行查询的数量,但没有按类型细分。 It increments from server start, so you'll have to record this on a daily basis and account for times when it gets reset. 它从服务器启动时开始递增,因此您必须每天记录一次并计算重置时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM