29.12.20.2 阶段总结表
性能模式维护用于收集当前和最近的阶段事件,并在摘要表中聚合这些信息。示例阶段事件摘要信息:
Example stage event summary information:
mysql> SELECT *
FROM performance_schema.events_stages_summary_global_by_event_name\G
...
*************************** 5. row ***************************
EVENT_NAME: stage/sql/checking permissions
COUNT_STAR: 57
SUM_TIMER_WAIT: 26501888880
MIN_TIMER_WAIT: 7317456
AVG_TIMER_WAIT: 464945295
MAX_TIMER_WAIT: 12858936792
...
*************************** 9. row ***************************
EVENT_NAME: stage/sql/closing tables
COUNT_STAR: 37
SUM_TIMER_WAIT: 662606568
MIN_TIMER_WAIT: 1593864
AVG_TIMER_WAIT: 17907891
MAX_TIMER_WAIT: 437977248
...
每个阶段摘要表都有一个或多个分组列,以指示表如何聚合事件。事件名称引用EVENT_, USER
, 和 HOST
列。每行总结了给定帐户(用户和主机组合)及其事件名称的事件。
-
events_stages_summary_by_account_by_event_name
hasEVENT_NAME
,USER
, andHOST
columns. Each row summarizes events for a given account (user and host combination) and event name.
每个阶段摘要表都有这些汇总列,包含聚合值:COUNT_STAR
, SUM_TIMER_WAIT
, MIN_
TIMER_WAIT
, AVG_
TIMER_WAIT
, 和 MAX_
TIMER_WAIT
。这些列与等待事件摘要表(见阶段摘要表有这些索引:
The stage summary tables have these indexes:
-
-
Primary key on (
USER
,HOST
,EVENT_NAME
)
-
-
-
Primary key on (
HOST
,EVENT_NAME
)
-
-
-
Primary key on (
THREAD_ID
,EVENT_NAME
)
-
-
-
Primary key on (
USER
,EVENT_NAME
)
-
-
-
Primary key on (
EVENT_NAME
)
-
-
对于不按账户、主机或用户进行聚合的总结表格,截断操作会将总结列重置为零,而不是删除行。
-
对于按账户、主机或用户进行聚合的总结表格,截断操作会删除没有连接的账户、主机或用户的行,并且对剩余行中的总结列重置为零。
此外,每个阶段的总结表格,如果是按账户、主机、用户或线程进行聚合,会隐式地受到连接表(或者依赖于其的表)截断操作的影响,或者是events_stages_summary_global_by_event_name
表的截断。有关详细信息,请参阅第29.12.8节,“性能_schema连接表”。