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

MySQL 5.7What is Performance Schema like

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

Share

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

Today, I will talk to you about MySQL 5.7 Performance Schema, which may not be well understood by many people. In order to let you know more, Xiaobian summarized the following contents for you. I hope you can gain something according to this article.

Performance Schema is a feature provided by MySQL to monitor MySQL server performance at the bottom of the system. The PERFORMANCE_SCHEMA storage engine monitors MySQL services for events.

Under this user there are a series of performance tables:

Setup table

These tables are used to configure and display monitored features

setup_actors Contains information about whether to turn on monitoring and about the history of events recorded at the new foreground service site. By default, this table has 100 rows, and this value can be changed by changing the performance_schema_setup_actors_size system parameter (which requires restarting the database service).

setup_consumers Displays the type of consumption of stored and enabled event information

setup_instruments Displays a table of collected events

setup_objects Controls whether Performance Schema monitors specific data objects. By default, this table can contain 100 rows, and this value can be changed by changing the performance_schema_setup_objects_size system parameter (which requires restarting the database service).

setup_timers Displays the currently selected event timer

current event table

events_waits_current Contains the current wait events, a thread displays a line showing the thread's most recent wait events and status

events_stages_current Contains the current stage of events, and each thread displays a line of information showing the thread's most recent wait events and status. This table can be executed with the TRUNCATE TABLE command. Of all stage event tables, events_stages_current is the most basic table

The events_stages_history and events_stages_history_long tables are logical tables generated from this table.

events_statements_current contains statements events

events_transactions_current Contains transaction events

history table

events_waits_history contains the last N events for each thread. The value of N can be set by changing the performance_schema_events_waits_history_size parameter (which requires restarting the database service). The associated waiting events are added to the table only when the event is finished, and when the expression reaches the set number of rows, the old events are deleted before adding new events.

events_waits_history_long Contains the N most recent events, the value of N can be set by changing the performance_schema_events_waits_history_long_size parameter (requires restarting the database service). The associated waiting events are added to the table only when the event is finished, and when the expression reaches the set number of rows, the old events are deleted before adding new events. When the thread ends, its associated information is removed from the table. This table can be TRUNCATE operated with the TRUNCATE TABLE command.

events_stages_history contains the most recent N stage events for each thread. The value of N can be set by changing the performance_schema_events_stages_history_size parameter (which requires restarting the database service). When the expression reaches the set number of rows, old events are deleted before adding new ones. This table can be subjected to TRUNCATE TABLE operations.

select thread_id,event_id,event_name,timer_wait from events_states_history

where thread_id in (select thread_id from threads where processlist_id=81)

order by event_id;

events_stages_history_long Contains the most recent N stage events. The value of N can be set by changing the performance_schema_events_stages_history_long_size parameter (which requires restarting the database service). When the expression reaches the set number of rows, old events are deleted before adding new ones. This table can be subjected to TRUNCATE TABLE operations. When the thread ends, its associated information is removed from the table.

summary table

These tables contain summary event information

instance table

These tables generate event names and status information

other tables

Other tables not listed in the above categories

threads contains information about each server thread, each line containing the status of a thread and indicating whether the thread is monitored and whether historical event logging is enabled

Do you have any idea what MySQL 5.7 Performance Schema looks like? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

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