Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Logical Analysis of Statistical data Collection of data Volume change in Mysql 5.7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the logical analysis of the statistical data collection of data volume change in Mysql 5.7, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

1. Persistence (PERSISTENT) and non-persistence statistics (TRANSIENT)

Mysql statistics are divided into persistence and non-persistence.

Persistent statistics are stored in mysql.innodb_index_stats and mysql.innodb_table_stats

Non-persistent statistics are stored in information_schema.indexes and information_schema.tables

The former is the innodb table and the latter is the memory table. They are controlled by the parameter innodb_stats_persistent, which defaults to ON.

Second, the way to change the persistent statistics.

When I look at the change logic, I find that non-persistent statistics are updated directly or synchronously. But persistent statistics should be updated asynchronously and appear to be a typical producer-consumer model. There is a special background thread in Mysql to collect statistics as follows:

Mysql > select name,thread_id from performance_schema.threads where NAME like'% dict_stats_thread%'\ gateway * 1. Row * * name: thread/innodb/dict_stats_threadthread_id: 25 Thank you for reading this article carefully I hope the article "logical Analysis of Statistical data Collection of data Volume change in Mysql 5.7" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel, and more related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report