Mysql question 和query的差异
question 和query 差不多,其实都是执行的语句数量,使用以下语句可以看到都在正在
mysql> show global status like 'Qu%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Queries | 745 |
| Questions | 397 |
+---------------+-------+
2 rows in set (0.01 sec)mysql> show global status like 'Qu%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Queries | 746 |
| Questions | 398 |
+---------------+-------+
根据 https://www.percona.com/blog/2014/05/29/how-mysql-queries-and-questions-are-measured/,两者的差异如下:
Queries
The number of statements executed by the server. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count COM_PING or COM_STATISTICS commands.
Questions
The number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries variable. This variable does not count COM_PING, COM_STATISTICS, COM_STMT_PREPARE, COM_STMT_CLOSE, or COM_STMT_RESET commands.
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
