你能解释一下MySQL 8吗
performance_schema events_statements_summary_by_digest count_start
?
+------------+----------------+
| COUNT_STAR | SUM_TIMER_WAIT |
+------------+----------------+
| 21562 | 1422617337000 |
| 5134 | 231538954000 |
| 5134 | 42625981791000 |
| 184 | 6224664000 |
| 65 | 67034144000 |
| 48 | 80661283000 |
| 39 | 25631638000 |
| 32 | 1131746000 |
| 32 | 1206939000 |
| 32 | 5997462000 |
| 20 | 2349761000 |
| 8 | 284036000 |
| 8 | 2976134000 |
| 7 | 1254130000 |
| 6 | 1792915000 |
| 6 | 784386000 |
| 6 | 821875000 |
| 6 | 1102248000 |
| 6 | 1079227000 |
| 5 | 11042289000 |
| 5 | 4207319000 |
| 5 | 4012671000 |
| 5 | 6844824000 |
+------------+----------------+
我在文档中找到了这个https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/wait-summary-tables.html但这对我来说很难理解。
COUNT_STAR
The number of summarized events. This value includes all events, whether timed or nontimed.
谢谢!
Performance schema 用于监控mysql数据库的性能,从5.6.6版本开始默认启用。您查询的表,即“events_statements_summary_by_digest”包含有关 sql 语句的信息,例如每个规范化语句的延迟、错误和查询量。摘要表规范化所有语句(如 DIGEST_TEXT 字段中所示),忽略数据值并标准化空格和大小写,以便以下两个查询将被视为相同:
从 emp_no >200 的员工中选择 *; SELECT * FROM 员工 WHERE emp_no > 80000;
现在您显示的两个属性是 COUNT_STAR 和 SUM_TIMER_WAIT。
COUNT_STAR:此字段显示规范化语句已运行的次数。
SUM_TIMER_WAIT:该字段显示规范化语句的累积运行时间(以皮秒为单位)。例如,如果语句的 count_star 为 2,第一次运行需要 2000000 皮秒,第二次运行需要 1000000 皮秒,则 SUM_TIMER_WAIT 将为 3000000。