如何在不重新启动MySQL的情况下刷新performance_schema统计信息? [英] How to flush performance_schema stats without restarting MySQL?

查看:385
本文介绍了如何在不重新启动MySQL的情况下刷新performance_schema统计信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道性能模式中的统计信息在MySQL重新启动后不会持续存在. 我想刷新所有统计信息而不重新启动MySQL.有什么办法吗?

I know stats in performance schema are not persistent over MySQL restarts. I want to flush all stats without restarting MySQL. Is there any way to do it?

谢谢.

推荐答案

TRUNCATE TABLE可用于重置统计信息.

TRUNCATE TABLE can be used to reset statistics.

请参见 https://dev. mysql.com/doc/refman/5.7/en/performance-schema-table-characteristics.html

摘要表可以用TRUNCATE TABLE截断.通常, 效果是将摘要列重置为0或NULL,而不是将其删除 行.这使您可以清除收集的值并重新启动 聚集.

Summary tables can be truncated with TRUNCATE TABLE. Generally, the effect is to reset the summary columns to 0 or NULL, not to remove rows. This enables you to clear collected values and restart aggregation.

这篇关于如何在不重新启动MySQL的情况下刷新performance_schema统计信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆