In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you what the MySQL database monitoring indicators are, which are concise and easy to understand, which can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1 、 performance_schema
The events_statements_summary_by_digest table of the performance mode holds a number of key metrics, grabbing delay, error, and query volume information related to each standardized statement.
A sample row taken from the table shows that a statement has been executed 18 times, with an average execution time of 2.5 milliseconds (all timers are measured in picoseconds)
Calculate the average elapsed time in microseconds by mode:
SELECT schema_name, SUM (count_star) count, ROUND ((SUM (sum_timer_wait) / SUM (count_star)) / 1000000) AS avg_microsec FROM performance_schema.events_statements_summary_by_digest WHERE schema_name IS NOT NULL GROUP BY schema_name
Calculate the total number of statements with errors by pattern:
SELECT schema_name, SUM (sum_errors) err_count FROM performance_schema.events_statements_summary_by_digest WHERE schema_name IS NOT NULL GROUP BY schema_name;2, sys mode
For special queries or surveys, it is usually easier to use MySQL's sys schema. The sys schema provides a structured set of metrics in a format that is easier for people to read, making the corresponding query simpler.
2.1. Find the slowest statement (the running time is outside 95):
SELECT * FROM sys.statements_with_runtimes_in_95th_percentile
2.2. See which standardized statements have errors:
SELECT * FROM sys.statements_with_errors_or_warnings;3, slow query
In addition to the rich performance data in both performance mode and sys mode, MySQL provides a Slow_queries counter that is incremented whenever the execution time of the query exceeds the value specified by the long_query_time parameter. By default, the threshold is set to 10 seconds.
SHOW VARIABLES LIKE 'long_query_time'
What are the monitoring indicators of MySQL database? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Text documents can be downloaded: link: https://pan.baidu.com/s/1o9c0Hyq password: md9w
© 2024 shulou.com SLNews company. All rights reserved.