MySQL 中的created_tmp_tables 服务器状态变量值不一致
我在两个终端中使用控制台客户端登录 (RDS) mysql 服务器,使用相同的数据库(这并不重要),并在每个终端中运行查询 show status like 'created%'
。它们显示一致的数字 - 无论我查询多少次,答案都不会改变。
但他们彼此意见不一。此外,每当我使用
不同的数据库时,该查询都会给出不同的响应,尽管该变量应该适用于整个服务器。
MySQL 页面给出了该变量的解释:
执行语句时服务器创建的内部临时表的数量。
您可以通过比较 Created_tmp_disk_tables 和 Created_tmp_tables 变量的值来比较创建的内部磁盘临时表的数量与创建的内部临时表的总数。
有人能解释为什么会发生这种情况吗?我完全不明白这个变量如何会减少,但是两次给出不同数字的会话让我感到非常困惑。
I log into the (RDS) mysql server with the console client in two terminals, use the same database (not that that should matter), and run the query show status like 'created%'
in each. They show a consistent number - no matter how many times I make the query, the answer doesn't change.
But they disagree with each other. Moreover,any time I use
a different database, that query gives a different response, though that variable is supposed to be for the whole server.
The MySQL page gives this explanation for the variable:
The number of internal temporary tables created by the server while executing statements.
You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparing the values of the Created_tmp_disk_tables and Created_tmp_tables variables.
Can anybody explain why this would be happening? I can't understand how that variable could decrease at all, but the two sessions giving different numbers has me extra-stumped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 http://dev.mysql 上的手册。 com/doc/refman/5.0/en/server-status-variables.html 您可以在每个会话以及全局请求此特定状态信息。
你能给我们输出
和
According to the manual at http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html you can request this specific status information both per session as well as globally.
Can you give us the output of
and