-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
weilin
committed
Dec 17, 2020
0 parents
commit 9638594
Showing
299 changed files
with
1,933 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
|
||
vendor | ||
*/vendor | ||
.idea | ||
*.log | ||
qms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
# 文档整理 | ||
- https://www.cnblogs.com/ivictor/p/5979731.html | ||
|
||
interactive_timeout针对交互式连接,wait_timeout针对非交互式连接 | ||
|
||
- https://blog.csdn.net/idwtwt/article/details/91345364 | ||
- https://blog.csdn.net/dghpgyss/article/details/86480837 | ||
|
||
mysql防止空闲连接过多,超过了mysql_connection配置之后,会拒绝新连接, | ||
自动关闭空闲连接超过wait_timeout、使用中连接超过interactive_timeout参数的连接 | ||
|
||
database/sql库连接池的max_lifetime大于wait_timeout,有可能拿到失效连接, | ||
建议设置wait_timeout/2 | ||
|
||
|
||
- https://github.com/go-sql-driver/mysql/pull/934 | ||
|
||
go-sql-driver/mysql 1.5版本增加失效连接 读写前检查 | ||
|
||
|
||
|
||
# 测试方案 | ||
|
||
## mysql配置 | ||
|
||
mysql 5.7 | ||
max_connections = 5 | ||
wait_timeout = 5 | ||
|
||
|
||
## 测试方案 | ||
|
||
仅修改go-sql-driver/mysql版本和SetConnMaxLifetime值 | ||
|
||
起5个go协程执行mysql查询,之后sleep 10s,循环执行该操作,观察报错信息 | ||
|
||
|
||
| go-sql-driver/mysql | SetConnMaxLifetime | 结果| | ||
| -- | -- | -- | | ||
| 1.4.1 | 20s | 稳定出现invalid connection | | ||
| 1.4.1| 2.5s | 未出现invalid connection; maxLifetimeClosed持续增加 | | ||
| 1.5.0 | 20s | 出现报错closing bad idle connection: EOF,但是可以正常查询 | | ||
|
||
- 并发原因 | ||
|
||
- 触发wait_timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[auto] | ||
server-uuid=6c6ff47e-402d-11eb-9477-0242ac120002 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
25,3 | ||
25,2 | ||
0,9 | ||
25,1 | ||
25,0 | ||
24,52 | ||
24,51 | ||
24,50 | ||
24,49 | ||
24,48 | ||
24,47 | ||
24,46 | ||
24,45 | ||
24,44 | ||
24,43 | ||
24,42 | ||
24,41 | ||
24,40 | ||
24,39 | ||
24,38 | ||
24,37 | ||
24,36 | ||
17,2 | ||
17,1 | ||
17,3 | ||
15,2 | ||
15,1 | ||
15,3 | ||
16,2 | ||
16,1 | ||
16,3 | ||
13,2 | ||
14,2 | ||
4,25 | ||
4,40 | ||
4,17 | ||
4,41 | ||
4,4 | ||
4,82 | ||
4,88 | ||
4,70 | ||
4,77 | ||
4,80 | ||
4,86 | ||
4,1 | ||
4,7 | ||
4,2 | ||
4,3 | ||
6,6 | ||
6,8 | ||
6,1 | ||
6,5 | ||
6,2 | ||
6,3 | ||
7,8 | ||
7,10 | ||
7,7 | ||
7,4 | ||
7,9 | ||
7,1 | ||
7,5 | ||
7,2 | ||
7,3 | ||
5,4 | ||
5,2 | ||
5,1 | ||
5,3 | ||
24,35 | ||
3,1 | ||
3,3 | ||
10,170 | ||
10,20 | ||
10,218 | ||
10,6 | ||
10,192 | ||
10,146 | ||
10,136 | ||
11,11 | ||
11,20 | ||
11,19 | ||
9,7 | ||
9,4 | ||
9,6 | ||
8,15 | ||
8,16 | ||
8,12 | ||
8,14 | ||
8,18 | ||
20,2 | ||
20,1 | ||
20,3 | ||
19,2 | ||
19,1 | ||
19,3 | ||
12,3 | ||
12,2 | ||
12,1 | ||
11,30 | ||
11,29 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�localhost performance_schema mysql.session �localhost sys mysql.sys |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
default-character-set=latin1 | ||
default-collation=latin1_swedish_ci |
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
default-character-set=utf8 | ||
default-collation=utf8_general_ci |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.67 KB
mysql/data/performance_schema/events_stages_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
mysql/data/performance_schema/events_stages_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.65 KB
mysql/data/performance_schema/events_stages_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
mysql/data/performance_schema/events_stages_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.61 KB
mysql/data/performance_schema/events_stages_summary_global_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.77 KB
mysql/data/performance_schema/events_statements_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.87 KB
mysql/data/performance_schema/events_statements_summary_by_digest.frm
Binary file not shown.
Binary file added
BIN
+9.74 KB
mysql/data/performance_schema/events_statements_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+10.1 KB
mysql/data/performance_schema/events_statements_summary_by_program.frm
Binary file not shown.
Binary file added
BIN
+9.75 KB
mysql/data/performance_schema/events_statements_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.74 KB
mysql/data/performance_schema/events_statements_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.71 KB
mysql/data/performance_schema/events_statements_summary_global_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.25 KB
mysql/data/performance_schema/events_transactions_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.22 KB
mysql/data/performance_schema/events_transactions_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.23 KB
mysql/data/performance_schema/events_transactions_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.22 KB
mysql/data/performance_schema/events_transactions_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9.19 KB
mysql/data/performance_schema/events_transactions_summary_global_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.67 KB
mysql/data/performance_schema/events_waits_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
mysql/data/performance_schema/events_waits_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.65 KB
mysql/data/performance_schema/events_waits_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.64 KB
mysql/data/performance_schema/events_waits_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.61 KB
mysql/data/performance_schema/events_waits_summary_global_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.02 KB
mysql/data/performance_schema/memory_summary_by_account_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.99 KB
mysql/data/performance_schema/memory_summary_by_host_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+9 KB
mysql/data/performance_schema/memory_summary_by_thread_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.99 KB
mysql/data/performance_schema/memory_summary_by_user_by_event_name.frm
Binary file not shown.
Binary file added
BIN
+8.96 KB
mysql/data/performance_schema/memory_summary_global_by_event_name.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.64 KB
mysql/data/performance_schema/replication_applier_status_by_coordinator.frm
Binary file not shown.
Binary file added
BIN
+8.74 KB
mysql/data/performance_schema/replication_applier_status_by_worker.frm
Binary file not shown.
Binary file added
BIN
+17.3 KB
mysql/data/performance_schema/replication_connection_configuration.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.3 KB
mysql/data/performance_schema/table_io_waits_summary_by_index_usage.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
default-character-set=utf8 | ||
default-collation=utf8_general_ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TYPE=VIEW | ||
query=select if(isnull(`performance_schema`.`accounts`.`HOST`),\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull((sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0)),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),\'background\',`performance_schema`.`accounts`.`HOST`) | ||
md5=e079676ec756edbb811a11a2d649f6e4 | ||
updatable=0 | ||
algorithm=1 | ||
definer_user=mysql.sys | ||
definer_host=localhost | ||
suid=0 | ||
with_check_option=0 | ||
timestamp=2020-12-17 06:02:30 | ||
create-version=1 | ||
source=SELECT IF(accounts.host IS NULL, \'background\', accounts.host) AS host, SUM(stmt.total) AS statements, sys.format_time(SUM(stmt.total_latency)) AS statement_latency, sys.format_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, sys.format_time(SUM(io.io_latency)) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT user) AS unique_users, sys.format_bytes(SUM(mem.current_allocated)) AS current_memory, sys.format_bytes(SUM(mem.total_allocated)) AS total_memory_allocated FROM performance_schema.accounts JOIN sys.x$host_summary_by_statement_latency AS stmt ON accounts.host = stmt.host JOIN sys.x$host_summary_by_file_io AS io ON accounts.host = io.host JOIN sys.x$memory_by_host_by_current_bytes mem ON accounts.host = mem.host GROUP BY IF(accounts.host IS NULL, \'background\', accounts.host) | ||
client_cs_name=utf8 | ||
connection_cl_name=utf8_general_ci | ||
view_body_utf8=select if(isnull(`performance_schema`.`accounts`.`HOST`),\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull((sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0)),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),\'background\',`performance_schema`.`accounts`.`HOST`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TYPE=VIEW | ||
query=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR`) AS `ios`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\') group by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc | ||
md5=53b0d9b1a70d1f81690a79d9d4d8f59c | ||
updatable=0 | ||
algorithm=1 | ||
definer_user=mysql.sys | ||
definer_host=localhost | ||
suid=0 | ||
with_check_option=0 | ||
timestamp=2020-12-17 06:02:30 | ||
create-version=1 | ||
source=SELECT IF(host IS NULL, \'background\', host) AS host, SUM(count_star) AS ios, sys.format_time(SUM(sum_timer_wait)) AS io_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name LIKE \'wait/io/file/%\' GROUP BY IF(host IS NULL, \'background\', host) ORDER BY SUM(sum_timer_wait) DESC | ||
client_cs_name=utf8 | ||
connection_cl_name=utf8_general_ci | ||
view_body_utf8=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR`) AS `ios`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\') group by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TYPE=VIEW | ||
query=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file%\') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc | ||
md5=58bace9fd830c2b849772ce5d565917e | ||
updatable=1 | ||
algorithm=2 | ||
definer_user=mysql.sys | ||
definer_host=localhost | ||
suid=0 | ||
with_check_option=0 | ||
timestamp=2020-12-17 06:02:30 | ||
create-version=1 | ||
source=SELECT IF(host IS NULL, \'background\', host) AS host, event_name, count_star AS total, sys.format_time(sum_timer_wait) AS total_latency, sys.format_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name LIKE \'wait/io/file%\' AND count_star > 0 ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC | ||
client_cs_name=utf8 | ||
connection_cl_name=utf8_general_ci | ||
view_body_utf8=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file%\') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TYPE=VIEW | ||
query=select if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where (`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc | ||
md5=b6ea9b98daa223ec9e82b8abb20f25f0 | ||
updatable=1 | ||
algorithm=2 | ||
definer_user=mysql.sys | ||
definer_host=localhost | ||
suid=0 | ||
with_check_option=0 | ||
timestamp=2020-12-17 06:02:30 | ||
create-version=1 | ||
source=SELECT IF(host IS NULL, \'background\', host) AS host, event_name, count_star AS total, sys.format_time(sum_timer_wait) AS total_latency, sys.format_time(avg_timer_wait) AS avg_latency FROM performance_schema.events_stages_summary_by_host_by_event_name WHERE sum_timer_wait != 0 ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC | ||
client_cs_name=utf8 | ||
connection_cl_name=utf8_general_ci | ||
view_body_utf8=select if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where (`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TYPE=VIEW | ||
query=select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc | ||
md5=61a6f2a6ed0dc94b05f4ed232d72e2b1 | ||
updatable=0 | ||
algorithm=1 | ||
definer_user=mysql.sys | ||
definer_host=localhost | ||
suid=0 | ||
with_check_option=0 | ||
timestamp=2020-12-17 06:02:30 | ||
create-version=1 | ||
source=SELECT IF(host IS NULL, \'background\', host) AS host, SUM(count_star) AS total, sys.format_time(SUM(sum_timer_wait)) AS total_latency, sys.format_time(MAX(max_timer_wait)) AS max_latency, sys.format_time(SUM(sum_lock_time)) AS lock_latency, SUM(sum_rows_sent) AS rows_sent, SUM(sum_rows_examined) AS rows_examined, SUM(sum_rows_affected) AS rows_affected, SUM(sum_no_index_used) + SUM(sum_no_good_index_used) AS full_scans FROM performance_schema.events_statements_summary_by_host_by_event_name GROUP BY IF(host IS NULL, \'background\', host) ORDER BY SUM(sum_timer_wait) DESC | ||
client_cs_name=utf8 | ||
connection_cl_name=utf8_general_ci | ||
view_body_utf8=select if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR`) AS `total`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`)) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(isnull(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) desc |
Oops, something went wrong.