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

How to understand the counter of show status

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article introduces the relevant knowledge of "how to understand the counter of show status". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Most of the results seen by show status are in the format of counters, which can show the frequency of some activities. There is no concept of time. The variance of time can be seen in the pt-query-digest tool. Including handle timer handler counter, temporary files, meter counter, and so on. The following is an example of a high-performance MYSQL. The test library is the sample library sakila:

Click (here) to collapse or open

Flush status

Select * from sakila.nicer_but_slower_film_list

Show status where variable_name like 'Handler%' or Variable_name like' Created%'

Click (here) to collapse or open

+-+ +

| | Variable_name | Value |

+-+ +

| | Created_tmp_disk_tables | 2 | |

| | Created_tmp_files | 0 | |

| | Created_tmp_tables | 3 | |

| | Handler_commit | 1 | |

| | Handler_delete | 0 | |

| | Handler_discover | 0 | |

| | Handler_external_lock | 10 | |

| | Handler_mrr_init | 0 | |

| | Handler_prepare | 0 | |

| | Handler_read_first | 1 | |

| | Handler_read_key | 7478 | |

| | Handler_read_last | 0 | |

| | Handler_read_next | 6462 | |

| | Handler_read_prev | 0 | |

| | Handler_read_rnd | 5462 | |

| | Handler_read_rnd_next | 6478 | |

| | Handler_rollback | 0 | |

| | Handler_savepoint | 0 | |

| | Handler_savepoint_rollback | 0 | |

| | Handler_update | 0 | |

| | Handler_write | 6459 | |

+-+ +

Created_tmp_disk_tables indicates that 2 disk temporary tables are used

Created_tmp_files

Created_tmp_tables indicates that three temporary tables are used

Handler_commit represents 1 internal commit statement

Handler_delete

Handler_discover

Handler_external_lock

Handler_mrr_init

Handler_prepare

Handler_read_first indicates the number of first entries executed in the index. If high, the server is performing a large number of full index scans.

Handler_read_key indicates the number of requests to read a row according to the key. If high, the query and table are indexed correctly.

Handler_read_last

Handler_read_next reads the number of requests for the next row in key order. If you use a range constraint or if you perform an index scan to query the index column, this value increases

Handler_read_prev

Handler_read_rnd represents the number of requests to read a line based on a fixed position. This value is higher if you are executing a large number of queries and need to sort the results. You may use a large number of queries that require MySQL to scan the entire table or your connection does not use keys correctly

Handler_read_rnd_next represents the number of requests to read the next line in the data file. If you are doing a lot of table scans, the value is higher. It usually indicates that your table index is incorrect or that the query you write does not make use of the index

Handler_rollback

Handler_savepoint

Handler_savepoint_rollback

Handler_update

Handler_write indicates the number of requests to insert a row in the table

This is the end of "how to understand the counter of show status". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Wechat

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

12
Report