diff --git a/.gitignore b/.gitignore index 49f8abe..b0dff38 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,6 @@ node_modules/* -db/* -!db/egytalk -!db/.gitkeep - !nginx nginx/* !nginx/nginx.conf diff --git a/db/.my-healthcheck.cnf b/db/.my-healthcheck.cnf new file mode 100755 index 0000000..2790889 --- /dev/null +++ b/db/.my-healthcheck.cnf @@ -0,0 +1,6 @@ +[mariadb-client] +port=3306 +socket=/var/run/mysqld/mysqld.sock +user=healthcheck +password=9!52gD]b{m`Z%|oVswReqnF*yyjWdRRQ + diff --git a/db/aria_log.00000001 b/db/aria_log.00000001 new file mode 100755 index 0000000..b63bc68 Binary files /dev/null and b/db/aria_log.00000001 differ diff --git a/db/aria_log_control b/db/aria_log_control new file mode 100755 index 0000000..8ed5042 Binary files /dev/null and b/db/aria_log_control differ diff --git a/db/db/db.opt b/db/db/db.opt new file mode 100755 index 0000000..32d2274 --- /dev/null +++ b/db/db/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_unicode_ci diff --git a/db/ddl_recovery-backup.log b/db/ddl_recovery-backup.log new file mode 100755 index 0000000..5e30b6d Binary files /dev/null and b/db/ddl_recovery-backup.log differ diff --git a/db/ddl_recovery.log b/db/ddl_recovery.log new file mode 100755 index 0000000..5e30b6d Binary files /dev/null and b/db/ddl_recovery.log differ diff --git a/db/ib_buffer_pool b/db/ib_buffer_pool new file mode 100755 index 0000000..95c9978 --- /dev/null +++ b/db/ib_buffer_pool @@ -0,0 +1,236 @@ +48,7 +48,6 +48,5 +48,4 +48,3 +48,2 +48,1 +48,0 +23,12 +23,11 +23,10 +23,9 +23,8 +23,7 +23,6 +23,5 +23,4 +23,3 +23,2 +23,1 +23,0 +22,9 +22,8 +22,7 +22,6 +22,5 +22,4 +22,3 +22,2 +22,1 +22,0 +21,34 +21,33 +21,32 +21,31 +21,30 +21,29 +21,28 +21,27 +21,26 +21,25 +21,24 +21,23 +21,22 +21,21 +21,20 +21,19 +21,18 +21,17 +21,16 +21,15 +21,14 +21,13 +21,12 +21,11 +21,10 +21,9 +21,8 +21,7 +21,6 +21,5 +21,4 +21,3 +21,2 +21,1 +21,0 +17,4 +17,3 +17,2 +17,1 +17,0 +12,3 +12,2 +12,1 +12,0 +7,3 +5,3 +4,3 +3,2 +2,2 +1,2 +0,9 +1,45 +3,44 +2,44 +1,44 +3,43 +2,43 +1,43 +3,42 +2,42 +1,42 +3,41 +2,41 +1,41 +3,46 +3,40 +2,50 +2,40 +1,40 +3,39 +2,39 +1,39 +3,38 +2,38 +1,38 +3,45 +3,37 +2,49 +2,37 +1,46 +1,37 +3,36 +2,48 +2,36 +1,36 +3,35 +2,47 +2,35 +1,35 +3,34 +2,46 +2,34 +1,34 +3,33 +2,33 +1,33 +3,32 +2,32 +1,32 +3,31 +2,31 +1,31 +3,30 +2,30 +1,30 +3,29 +2,45 +2,29 +1,29 +3,28 +2,28 +1,28 +3,27 +2,27 +1,27 +3,26 +2,26 +1,26 +3,25 +2,25 +1,25 +3,24 +2,24 +1,24 +3,23 +2,23 +1,23 +3,22 +2,22 +1,22 +3,21 +2,21 +1,21 +3,20 +2,20 +1,20 +3,19 +2,19 +1,19 +3,18 +2,18 +1,18 +3,17 +2,17 +1,17 +3,16 +2,16 +1,16 +3,15 +2,15 +1,15 +3,14 +2,14 +1,14 +3,13 +2,13 +1,13 +3,12 +2,12 +1,12 +3,11 +2,11 +1,11 +3,10 +2,10 +1,10 +3,9 +2,9 +1,9 +3,8 +2,8 +1,8 +3,7 +2,7 +1,7 +3,6 +2,6 +1,6 +3,5 +2,5 +1,5 +3,4 +2,4 +1,4 +3,3 +3,0 +2,3 +2,0 +1,3 +1,0 +0,6 +0,0 +0,47 +0,46 +0,49 +0,48 +0,45 +0,12 +0,10 +0,8 +0,11 +0,5 +0,7 +0,4 +0,3 diff --git a/db/ib_logfile0 b/db/ib_logfile0 new file mode 100755 index 0000000..5fe6365 Binary files /dev/null and b/db/ib_logfile0 differ diff --git a/db/ibdata1 b/db/ibdata1 new file mode 100755 index 0000000..a37c610 Binary files /dev/null and b/db/ibdata1 differ diff --git a/db/ibtmp1 b/db/ibtmp1 new file mode 100755 index 0000000..202d95c Binary files /dev/null and b/db/ibtmp1 differ diff --git a/db/mariadb_upgrade_info b/db/mariadb_upgrade_info new file mode 100755 index 0000000..2b236c4 --- /dev/null +++ b/db/mariadb_upgrade_info @@ -0,0 +1 @@ +11.5.2-MariaDB \ No newline at end of file diff --git a/db/multi-master.info b/db/multi-master.info new file mode 100755 index 0000000..e69de29 diff --git a/db/mysql/column_stats.MAD b/db/mysql/column_stats.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/column_stats.MAD differ diff --git a/db/mysql/column_stats.MAI b/db/mysql/column_stats.MAI new file mode 100755 index 0000000..60dd794 Binary files /dev/null and b/db/mysql/column_stats.MAI differ diff --git a/db/mysql/column_stats.frm b/db/mysql/column_stats.frm new file mode 100755 index 0000000..fb499ef Binary files /dev/null and b/db/mysql/column_stats.frm differ diff --git a/db/mysql/columns_priv.MAD b/db/mysql/columns_priv.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/columns_priv.MAD differ diff --git a/db/mysql/columns_priv.MAI b/db/mysql/columns_priv.MAI new file mode 100755 index 0000000..2e48ae3 Binary files /dev/null and b/db/mysql/columns_priv.MAI differ diff --git a/db/mysql/columns_priv.frm b/db/mysql/columns_priv.frm new file mode 100755 index 0000000..fec5dbb Binary files /dev/null and b/db/mysql/columns_priv.frm differ diff --git a/db/mysql/db.MAD b/db/mysql/db.MAD new file mode 100755 index 0000000..0b48e94 Binary files /dev/null and b/db/mysql/db.MAD differ diff --git a/db/mysql/db.MAI b/db/mysql/db.MAI new file mode 100755 index 0000000..582793b Binary files /dev/null and b/db/mysql/db.MAI differ diff --git a/db/mysql/db.frm b/db/mysql/db.frm new file mode 100755 index 0000000..2e618be Binary files /dev/null and b/db/mysql/db.frm differ diff --git a/db/mysql/db.opt b/db/mysql/db.opt new file mode 100755 index 0000000..32d2274 --- /dev/null +++ b/db/mysql/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_unicode_ci diff --git a/db/mysql/event.MAD b/db/mysql/event.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/event.MAD differ diff --git a/db/mysql/event.MAI b/db/mysql/event.MAI new file mode 100755 index 0000000..a746bf9 Binary files /dev/null and b/db/mysql/event.MAI differ diff --git a/db/mysql/event.frm b/db/mysql/event.frm new file mode 100755 index 0000000..6dfd4f4 Binary files /dev/null and b/db/mysql/event.frm differ diff --git a/db/mysql/func.MAD b/db/mysql/func.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/func.MAD differ diff --git a/db/mysql/func.MAI b/db/mysql/func.MAI new file mode 100755 index 0000000..22fe6f5 Binary files /dev/null and b/db/mysql/func.MAI differ diff --git a/db/mysql/func.frm b/db/mysql/func.frm new file mode 100755 index 0000000..a6771a3 Binary files /dev/null and b/db/mysql/func.frm differ diff --git a/db/mysql/general_log.CSM b/db/mysql/general_log.CSM new file mode 100755 index 0000000..8d08b8d Binary files /dev/null and b/db/mysql/general_log.CSM differ diff --git a/db/mysql/general_log.CSV b/db/mysql/general_log.CSV new file mode 100755 index 0000000..e69de29 diff --git a/db/mysql/general_log.frm b/db/mysql/general_log.frm new file mode 100755 index 0000000..c7cc516 Binary files /dev/null and b/db/mysql/general_log.frm differ diff --git a/db/mysql/global_priv.MAD b/db/mysql/global_priv.MAD new file mode 100755 index 0000000..db1b87a Binary files /dev/null and b/db/mysql/global_priv.MAD differ diff --git a/db/mysql/global_priv.MAI b/db/mysql/global_priv.MAI new file mode 100755 index 0000000..8c6fd49 Binary files /dev/null and b/db/mysql/global_priv.MAI differ diff --git a/db/mysql/global_priv.frm b/db/mysql/global_priv.frm new file mode 100755 index 0000000..e911079 Binary files /dev/null and b/db/mysql/global_priv.frm differ diff --git a/db/mysql/gtid_slave_pos.frm b/db/mysql/gtid_slave_pos.frm new file mode 100755 index 0000000..e40eaba Binary files /dev/null and b/db/mysql/gtid_slave_pos.frm differ diff --git a/db/mysql/gtid_slave_pos.ibd b/db/mysql/gtid_slave_pos.ibd new file mode 100755 index 0000000..c0e6af8 Binary files /dev/null and b/db/mysql/gtid_slave_pos.ibd differ diff --git a/db/mysql/help_category.MAD b/db/mysql/help_category.MAD new file mode 100755 index 0000000..37faeac Binary files /dev/null and b/db/mysql/help_category.MAD differ diff --git a/db/mysql/help_category.MAI b/db/mysql/help_category.MAI new file mode 100755 index 0000000..7cde388 Binary files /dev/null and b/db/mysql/help_category.MAI differ diff --git a/db/mysql/help_category.frm b/db/mysql/help_category.frm new file mode 100755 index 0000000..560c3f4 Binary files /dev/null and b/db/mysql/help_category.frm differ diff --git a/db/mysql/help_keyword.MAD b/db/mysql/help_keyword.MAD new file mode 100755 index 0000000..796b299 Binary files /dev/null and b/db/mysql/help_keyword.MAD differ diff --git a/db/mysql/help_keyword.MAI b/db/mysql/help_keyword.MAI new file mode 100755 index 0000000..e9fcd5b Binary files /dev/null and b/db/mysql/help_keyword.MAI differ diff --git a/db/mysql/help_keyword.frm b/db/mysql/help_keyword.frm new file mode 100755 index 0000000..167f7b2 Binary files /dev/null and b/db/mysql/help_keyword.frm differ diff --git a/db/mysql/help_relation.MAD b/db/mysql/help_relation.MAD new file mode 100755 index 0000000..f5f0ebd Binary files /dev/null and b/db/mysql/help_relation.MAD differ diff --git a/db/mysql/help_relation.MAI b/db/mysql/help_relation.MAI new file mode 100755 index 0000000..5425116 Binary files /dev/null and b/db/mysql/help_relation.MAI differ diff --git a/db/mysql/help_relation.frm b/db/mysql/help_relation.frm new file mode 100755 index 0000000..274a984 Binary files /dev/null and b/db/mysql/help_relation.frm differ diff --git a/db/mysql/help_topic.MAD b/db/mysql/help_topic.MAD new file mode 100755 index 0000000..ddb5389 Binary files /dev/null and b/db/mysql/help_topic.MAD differ diff --git a/db/mysql/help_topic.MAI b/db/mysql/help_topic.MAI new file mode 100755 index 0000000..bb1ce4b Binary files /dev/null and b/db/mysql/help_topic.MAI differ diff --git a/db/mysql/help_topic.frm b/db/mysql/help_topic.frm new file mode 100755 index 0000000..1395c59 Binary files /dev/null and b/db/mysql/help_topic.frm differ diff --git a/db/mysql/index_stats.MAD b/db/mysql/index_stats.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/index_stats.MAD differ diff --git a/db/mysql/index_stats.MAI b/db/mysql/index_stats.MAI new file mode 100755 index 0000000..e040dcc Binary files /dev/null and b/db/mysql/index_stats.MAI differ diff --git a/db/mysql/index_stats.frm b/db/mysql/index_stats.frm new file mode 100755 index 0000000..a98692a Binary files /dev/null and b/db/mysql/index_stats.frm differ diff --git a/db/mysql/innodb_index_stats.frm b/db/mysql/innodb_index_stats.frm new file mode 100755 index 0000000..3b050b1 Binary files /dev/null and b/db/mysql/innodb_index_stats.frm differ diff --git a/db/mysql/innodb_index_stats.ibd b/db/mysql/innodb_index_stats.ibd new file mode 100755 index 0000000..482f415 Binary files /dev/null and b/db/mysql/innodb_index_stats.ibd differ diff --git a/db/mysql/innodb_table_stats.frm b/db/mysql/innodb_table_stats.frm new file mode 100755 index 0000000..1ba6e11 Binary files /dev/null and b/db/mysql/innodb_table_stats.frm differ diff --git a/db/mysql/innodb_table_stats.ibd b/db/mysql/innodb_table_stats.ibd new file mode 100755 index 0000000..91e39be Binary files /dev/null and b/db/mysql/innodb_table_stats.ibd differ diff --git a/db/mysql/plugin.MAD b/db/mysql/plugin.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/plugin.MAD differ diff --git a/db/mysql/plugin.MAI b/db/mysql/plugin.MAI new file mode 100755 index 0000000..d280022 Binary files /dev/null and b/db/mysql/plugin.MAI differ diff --git a/db/mysql/plugin.frm b/db/mysql/plugin.frm new file mode 100755 index 0000000..c151635 Binary files /dev/null and b/db/mysql/plugin.frm differ diff --git a/db/mysql/proc.MAD b/db/mysql/proc.MAD new file mode 100755 index 0000000..4e4c112 Binary files /dev/null and b/db/mysql/proc.MAD differ diff --git a/db/mysql/proc.MAI b/db/mysql/proc.MAI new file mode 100755 index 0000000..8f3f447 Binary files /dev/null and b/db/mysql/proc.MAI differ diff --git a/db/mysql/proc.frm b/db/mysql/proc.frm new file mode 100755 index 0000000..055dc98 Binary files /dev/null and b/db/mysql/proc.frm differ diff --git a/db/mysql/procs_priv.MAD b/db/mysql/procs_priv.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/procs_priv.MAD differ diff --git a/db/mysql/procs_priv.MAI b/db/mysql/procs_priv.MAI new file mode 100755 index 0000000..e52b7df Binary files /dev/null and b/db/mysql/procs_priv.MAI differ diff --git a/db/mysql/procs_priv.frm b/db/mysql/procs_priv.frm new file mode 100755 index 0000000..2c49a6c Binary files /dev/null and b/db/mysql/procs_priv.frm differ diff --git a/db/mysql/proxies_priv.MAD b/db/mysql/proxies_priv.MAD new file mode 100755 index 0000000..4130ade Binary files /dev/null and b/db/mysql/proxies_priv.MAD differ diff --git a/db/mysql/proxies_priv.MAI b/db/mysql/proxies_priv.MAI new file mode 100755 index 0000000..db2d89c Binary files /dev/null and b/db/mysql/proxies_priv.MAI differ diff --git a/db/mysql/proxies_priv.frm b/db/mysql/proxies_priv.frm new file mode 100755 index 0000000..7f7e804 Binary files /dev/null and b/db/mysql/proxies_priv.frm differ diff --git a/db/mysql/roles_mapping.MAD b/db/mysql/roles_mapping.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/roles_mapping.MAD differ diff --git a/db/mysql/roles_mapping.MAI b/db/mysql/roles_mapping.MAI new file mode 100755 index 0000000..96f9b93 Binary files /dev/null and b/db/mysql/roles_mapping.MAI differ diff --git a/db/mysql/roles_mapping.frm b/db/mysql/roles_mapping.frm new file mode 100755 index 0000000..af955dc Binary files /dev/null and b/db/mysql/roles_mapping.frm differ diff --git a/db/mysql/servers.MAD b/db/mysql/servers.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/servers.MAD differ diff --git a/db/mysql/servers.MAI b/db/mysql/servers.MAI new file mode 100755 index 0000000..17acf58 Binary files /dev/null and b/db/mysql/servers.MAI differ diff --git a/db/mysql/servers.frm b/db/mysql/servers.frm new file mode 100755 index 0000000..2ae4077 Binary files /dev/null and b/db/mysql/servers.frm differ diff --git a/db/mysql/slow_log.CSM b/db/mysql/slow_log.CSM new file mode 100755 index 0000000..8d08b8d Binary files /dev/null and b/db/mysql/slow_log.CSM differ diff --git a/db/mysql/slow_log.CSV b/db/mysql/slow_log.CSV new file mode 100755 index 0000000..e69de29 diff --git a/db/mysql/slow_log.frm b/db/mysql/slow_log.frm new file mode 100755 index 0000000..3ec310a Binary files /dev/null and b/db/mysql/slow_log.frm differ diff --git a/db/mysql/table_stats.MAD b/db/mysql/table_stats.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/table_stats.MAD differ diff --git a/db/mysql/table_stats.MAI b/db/mysql/table_stats.MAI new file mode 100755 index 0000000..520dfa5 Binary files /dev/null and b/db/mysql/table_stats.MAI differ diff --git a/db/mysql/table_stats.frm b/db/mysql/table_stats.frm new file mode 100755 index 0000000..62fd0c2 Binary files /dev/null and b/db/mysql/table_stats.frm differ diff --git a/db/mysql/tables_priv.MAD b/db/mysql/tables_priv.MAD new file mode 100755 index 0000000..74de09a Binary files /dev/null and b/db/mysql/tables_priv.MAD differ diff --git a/db/mysql/tables_priv.MAI b/db/mysql/tables_priv.MAI new file mode 100755 index 0000000..9d7d5ef Binary files /dev/null and b/db/mysql/tables_priv.MAI differ diff --git a/db/mysql/tables_priv.frm b/db/mysql/tables_priv.frm new file mode 100755 index 0000000..e31228b Binary files /dev/null and b/db/mysql/tables_priv.frm differ diff --git a/db/mysql/time_zone.MAD b/db/mysql/time_zone.MAD new file mode 100755 index 0000000..cd0df37 Binary files /dev/null and b/db/mysql/time_zone.MAD differ diff --git a/db/mysql/time_zone.MAI b/db/mysql/time_zone.MAI new file mode 100755 index 0000000..73bfdd9 Binary files /dev/null and b/db/mysql/time_zone.MAI differ diff --git a/db/mysql/time_zone.frm b/db/mysql/time_zone.frm new file mode 100755 index 0000000..8f3d34d Binary files /dev/null and b/db/mysql/time_zone.frm differ diff --git a/db/mysql/time_zone_leap_second.MAD b/db/mysql/time_zone_leap_second.MAD new file mode 100755 index 0000000..3dcc005 Binary files /dev/null and b/db/mysql/time_zone_leap_second.MAD differ diff --git a/db/mysql/time_zone_leap_second.MAI b/db/mysql/time_zone_leap_second.MAI new file mode 100755 index 0000000..0781fd0 Binary files /dev/null and b/db/mysql/time_zone_leap_second.MAI differ diff --git a/db/mysql/time_zone_leap_second.frm b/db/mysql/time_zone_leap_second.frm new file mode 100755 index 0000000..732f03e Binary files /dev/null and b/db/mysql/time_zone_leap_second.frm differ diff --git a/db/mysql/time_zone_name.MAD b/db/mysql/time_zone_name.MAD new file mode 100755 index 0000000..296f77b Binary files /dev/null and b/db/mysql/time_zone_name.MAD differ diff --git a/db/mysql/time_zone_name.MAI b/db/mysql/time_zone_name.MAI new file mode 100755 index 0000000..a9c4fa4 Binary files /dev/null and b/db/mysql/time_zone_name.MAI differ diff --git a/db/mysql/time_zone_name.frm b/db/mysql/time_zone_name.frm new file mode 100755 index 0000000..3acd8a2 Binary files /dev/null and b/db/mysql/time_zone_name.frm differ diff --git a/db/mysql/time_zone_transition.MAD b/db/mysql/time_zone_transition.MAD new file mode 100755 index 0000000..f16974d Binary files /dev/null and b/db/mysql/time_zone_transition.MAD differ diff --git a/db/mysql/time_zone_transition.MAI b/db/mysql/time_zone_transition.MAI new file mode 100755 index 0000000..f158652 Binary files /dev/null and b/db/mysql/time_zone_transition.MAI differ diff --git a/db/mysql/time_zone_transition.frm b/db/mysql/time_zone_transition.frm new file mode 100755 index 0000000..7f220d4 Binary files /dev/null and b/db/mysql/time_zone_transition.frm differ diff --git a/db/mysql/time_zone_transition_type.MAD b/db/mysql/time_zone_transition_type.MAD new file mode 100755 index 0000000..11d8198 Binary files /dev/null and b/db/mysql/time_zone_transition_type.MAD differ diff --git a/db/mysql/time_zone_transition_type.MAI b/db/mysql/time_zone_transition_type.MAI new file mode 100755 index 0000000..a219911 Binary files /dev/null and b/db/mysql/time_zone_transition_type.MAI differ diff --git a/db/mysql/time_zone_transition_type.frm b/db/mysql/time_zone_transition_type.frm new file mode 100755 index 0000000..69d5189 Binary files /dev/null and b/db/mysql/time_zone_transition_type.frm differ diff --git a/db/mysql/transaction_registry.frm b/db/mysql/transaction_registry.frm new file mode 100755 index 0000000..9f81136 Binary files /dev/null and b/db/mysql/transaction_registry.frm differ diff --git a/db/mysql/transaction_registry.ibd b/db/mysql/transaction_registry.ibd new file mode 100755 index 0000000..f662b21 Binary files /dev/null and b/db/mysql/transaction_registry.ibd differ diff --git a/db/mysql/user.frm b/db/mysql/user.frm new file mode 100755 index 0000000..8eecdd7 --- /dev/null +++ b/db/mysql/user.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.plugin\') in (\'mysql_native_password\',\'mysql_old_password\'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.authentication_string\'),\'\'),\'\') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1,\'Y\',\'N\') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2,\'Y\',\'N\') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4,\'Y\',\'N\') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8,\'Y\',\'N\') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16,\'Y\',\'N\') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 32,\'Y\',\'N\') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 64,\'Y\',\'N\') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 128,\'Y\',\'N\') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 256,\'Y\',\'N\') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 512,\'Y\',\'N\') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1024,\'Y\',\'N\') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2048,\'Y\',\'N\') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4096,\'Y\',\'N\') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8192,\'Y\',\'N\') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16384,\'Y\',\'N\') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 32768,\'Y\',\'N\') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 65536,\'Y\',\'N\') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 131072,\'Y\',\'N\') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 262144,\'Y\',\'N\') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 524288,\'Y\',\'N\') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1048576,\'Y\',\'N\') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2097152,\'Y\',\'N\') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4194304,\'Y\',\'N\') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8388608,\'Y\',\'N\') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16777216,\'Y\',\'N\') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 33554432,\'Y\',\'N\') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 67108864,\'Y\',\'N\') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 134217728,\'Y\',\'N\') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 268435456,\'Y\',\'N\') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 536870912,\'Y\',\'N\') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.ssl_type\'),0) + 1,\'\',\'ANY\',\'X509\',\'SPECIFIED\') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.ssl_cipher\'),\'\') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.x509_issuer\'),\'\') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.x509_subject\'),\'\') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_questions\'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_updates\'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_connections\'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_user_connections\'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.plugin\'),\'\') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.authentication_string\'),\'\') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.password_last_changed\'),1) = 0,\'Y\',\'N\') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.is_role\'),0) + 1,\'N\',\'Y\') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.default_role\'),\'\') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_statement_time\'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` +md5=9e8063501afc8396f55d7c723632d5d8 +updatable=1 +algorithm=0 +definer_user=mariadb.sys +definer_host=localhost +suid=1 +with_check_option=0 +timestamp=0001724324138532524 +create-version=2 +source=SELECT\n Host,\n User,\n IF(JSON_VALUE(Priv, \'$.plugin\') IN (\'mysql_native_password\', \'mysql_old_password\'), IFNULL(JSON_VALUE(Priv, \'$.authentication_string\'), \'\'), \'\') AS Password,\n IF(JSON_VALUE(Priv, \'$.access\') & 1, \'Y\', \'N\') AS Select_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 2, \'Y\', \'N\') AS Insert_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 4, \'Y\', \'N\') AS Update_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 8, \'Y\', \'N\') AS Delete_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 16, \'Y\', \'N\') AS Create_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 32, \'Y\', \'N\') AS Drop_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 64, \'Y\', \'N\') AS Reload_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 128, \'Y\', \'N\') AS Shutdown_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 256, \'Y\', \'N\') AS Process_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 512, \'Y\', \'N\') AS File_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 1024, \'Y\', \'N\') AS Grant_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 2048, \'Y\', \'N\') AS References_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 4096, \'Y\', \'N\') AS Index_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 8192, \'Y\', \'N\') AS Alter_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 16384, \'Y\', \'N\') AS Show_db_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 32768, \'Y\', \'N\') AS Super_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 65536, \'Y\', \'N\') AS Create_tmp_table_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 131072, \'Y\', \'N\') AS Lock_tables_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 262144, \'Y\', \'N\') AS Execute_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 524288, \'Y\', \'N\') AS Repl_slave_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 1048576, \'Y\', \'N\') AS Repl_client_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 2097152, \'Y\', \'N\') AS Create_view_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 4194304, \'Y\', \'N\') AS Show_view_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 8388608, \'Y\', \'N\') AS Create_routine_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 16777216, \'Y\', \'N\') AS Alter_routine_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 33554432, \'Y\', \'N\') AS Create_user_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 67108864, \'Y\', \'N\') AS Event_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 134217728, \'Y\', \'N\') AS Trigger_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 268435456, \'Y\', \'N\') AS Create_tablespace_priv,\n IF(JSON_VALUE(Priv, \'$.access\') & 536870912, \'Y\', \'N\') AS Delete_history_priv,\n ELT(IFNULL(JSON_VALUE(Priv, \'$.ssl_type\'), 0) + 1, \'\', \'ANY\',\'X509\', \'SPECIFIED\') AS ssl_type,\n IFNULL(JSON_VALUE(Priv, \'$.ssl_cipher\'), \'\') AS ssl_cipher,\n IFNULL(JSON_VALUE(Priv, \'$.x509_issuer\'), \'\') AS x509_issuer,\n IFNULL(JSON_VALUE(Priv, \'$.x509_subject\'), \'\') AS x509_subject,\n CAST(IFNULL(JSON_VALUE(Priv, \'$.max_questions\'), 0) AS UNSIGNED) AS max_questions,\n CAST(IFNULL(JSON_VALUE(Priv, \'$.max_updates\'), 0) AS UNSIGNED) AS max_updates,\n CAST(IFNULL(JSON_VALUE(Priv, \'$.max_connections\'), 0) AS UNSIGNED) AS max_connections,\n CAST(IFNULL(JSON_VALUE(Priv, \'$.max_user_connections\'), 0) AS SIGNED) AS max_user_connections,\n IFNULL(JSON_VALUE(Priv, \'$.plugin\'), \'\') AS plugin,\n IFNULL(JSON_VALUE(Priv, \'$.authentication_string\'), \'\') AS authentication_string,\n IF(IFNULL(JSON_VALUE(Priv, \'$.password_last_changed\'), 1) = 0, \'Y\', \'N\') AS password_expired,\n ELT(IFNULL(JSON_VALUE(Priv, \'$.is_role\'), 0) + 1, \'N\', \'Y\') AS is_role,\n IFNULL(JSON_VALUE(Priv, \'$.default_role\'), \'\') AS default_role,\n CAST(IFNULL(JSON_VALUE(Priv, \'$.max_statement_time\'), 0.0) AS DECIMAL(12,6)) AS max_statement_time\n FROM global_priv; +client_cs_name=latin1 +connection_cl_name=latin1_swedish_ci +view_body_utf8=select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.plugin\') in (\'mysql_native_password\',\'mysql_old_password\'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.authentication_string\'),\'\'),\'\') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1,\'Y\',\'N\') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2,\'Y\',\'N\') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4,\'Y\',\'N\') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8,\'Y\',\'N\') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16,\'Y\',\'N\') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 32,\'Y\',\'N\') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 64,\'Y\',\'N\') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 128,\'Y\',\'N\') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 256,\'Y\',\'N\') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 512,\'Y\',\'N\') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1024,\'Y\',\'N\') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2048,\'Y\',\'N\') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4096,\'Y\',\'N\') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8192,\'Y\',\'N\') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16384,\'Y\',\'N\') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 32768,\'Y\',\'N\') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 65536,\'Y\',\'N\') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 131072,\'Y\',\'N\') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 262144,\'Y\',\'N\') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 524288,\'Y\',\'N\') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 1048576,\'Y\',\'N\') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 2097152,\'Y\',\'N\') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 4194304,\'Y\',\'N\') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 8388608,\'Y\',\'N\') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 16777216,\'Y\',\'N\') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 33554432,\'Y\',\'N\') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 67108864,\'Y\',\'N\') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 134217728,\'Y\',\'N\') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 268435456,\'Y\',\'N\') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,\'$.access\') & 536870912,\'Y\',\'N\') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.ssl_type\'),0) + 1,\'\',\'ANY\',\'X509\',\'SPECIFIED\') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.ssl_cipher\'),\'\') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.x509_issuer\'),\'\') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.x509_subject\'),\'\') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_questions\'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_updates\'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_connections\'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_user_connections\'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.plugin\'),\'\') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.authentication_string\'),\'\') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.password_last_changed\'),1) = 0,\'Y\',\'N\') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.is_role\'),0) + 1,\'N\',\'Y\') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.default_role\'),\'\') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,\'$.max_statement_time\'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` +mariadb-version=110502 diff --git a/db/performance_schema/db.opt b/db/performance_schema/db.opt new file mode 100755 index 0000000..22f8585 --- /dev/null +++ b/db/performance_schema/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb3 +default-collation=utf8mb3_general_ci diff --git a/db/sys/db.opt b/db/sys/db.opt new file mode 100755 index 0000000..22f8585 --- /dev/null +++ b/db/sys/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb3 +default-collation=utf8mb3_general_ci diff --git a/db/sys/host_summary.frm b/db/sys/host_summary.frm new file mode 100755 index 0000000..e48f1b8 --- /dev/null +++ b/db/sys/host_summary.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,format_pico_time(sum(`stmt`.`total_latency`)) AS `statement_latency`,format_pico_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`,format_pico_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(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +md5=9d308ebdfc57e16758aca9e4c6a95b19 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140079918 +create-version=2 +source=SELECT IF(accounts.host IS NULL, \'background\', accounts.host) AS host,\n SUM(stmt.total) AS statements,\n format_pico_time(SUM(stmt.total_latency)) AS statement_latency,\n format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency,\n SUM(stmt.full_scans) AS table_scans,\n SUM(io.ios) AS file_ios,\n format_pico_time(SUM(io.io_latency)) AS file_io_latency,\n SUM(accounts.current_connections) AS current_connections,\n SUM(accounts.total_connections) AS total_connections,\n COUNT(DISTINCT user) AS unique_users,\n sys.format_bytes(SUM(mem.current_allocated)) AS current_memory,\n sys.format_bytes(SUM(mem.total_allocated)) AS total_memory_allocated\n FROM performance_schema.accounts\n JOIN sys.x$host_summary_by_statement_latency AS stmt ON accounts.host = stmt.host\n JOIN sys.x$host_summary_by_file_io AS io ON accounts.host = io.host\n JOIN sys.x$memory_by_host_by_current_bytes mem ON accounts.host = mem.host\n GROUP BY IF(accounts.host IS NULL, \'background\', accounts.host); +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,format_pico_time(sum(`stmt`.`total_latency`)) AS `statement_latency`,format_pico_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`,format_pico_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(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +mariadb-version=110502 diff --git a/db/sys/host_summary_by_file_io.frm b/db/sys/host_summary_by_file_io.frm new file mode 100755 index 0000000..ccca8a5 --- /dev/null +++ b/db/sys/host_summary_by_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=ed2ae963a78a6a2bac61dd22f3cbc4f6 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140025685 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS ios,\n format_pico_time(SUM(sum_timer_wait)) AS io_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/host_summary_by_file_io_type.frm b/db/sys/host_summary_by_file_io_type.frm new file mode 100755 index 0000000..7f67f90 --- /dev/null +++ b/db/sys/host_summary_by_file_io_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=642fe6a7c3b6108d6b59443fc10c462f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140012599 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name LIKE \'wait/io/file%\'\n AND count_star > 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/host_summary_by_stages.frm b/db/sys/host_summary_by_stages.frm new file mode 100755 index 0000000..8540a81 --- /dev/null +++ b/db/sys/host_summary_by_stages.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_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(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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=338c41d6e3c505c9bbff217479a811f9 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140065503 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency\n FROM performance_schema.events_stages_summary_by_host_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_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(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/host_summary_by_statement_latency.frm b/db/sys/host_summary_by_statement_latency.frm new file mode 100755 index 0000000..2803dfe --- /dev/null +++ b/db/sys/host_summary_by_statement_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,format_pico_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(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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=41a7ff7a1fc9ad52daba6e441887ef43 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140051280 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS total,\n format_pico_time(SUM(sum_timer_wait)) AS total_latency,\n format_pico_time(MAX(max_timer_wait)) AS max_latency,\n format_pico_time(SUM(sum_lock_time)) AS lock_latency,\n SUM(sum_rows_sent) AS rows_sent,\n SUM(sum_rows_examined) AS rows_examined,\n SUM(sum_rows_affected) AS rows_affected,\n SUM(sum_no_index_used) + SUM(sum_no_good_index_used) AS full_scans\n FROM performance_schema.events_statements_summary_by_host_by_event_name\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,format_pico_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(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/host_summary_by_statement_type.frm b/db/sys/host_summary_by_statement_type.frm new file mode 100755 index 0000000..1fc38de --- /dev/null +++ b/db/sys/host_summary_by_statement_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `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` where `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc +md5=1be13212fa0d3d40dd76ca1dcf43f555 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140038164 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUBSTRING_INDEX(event_name, \'/\', -1) AS statement,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(max_timer_wait) AS max_latency,\n format_pico_time(sum_lock_time) AS lock_latency,\n sum_rows_sent AS rows_sent,\n sum_rows_examined AS rows_examined,\n sum_rows_affected AS rows_affected,\n sum_no_index_used + sum_no_good_index_used AS full_scans\n FROM performance_schema.events_statements_summary_by_host_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `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` where `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/innodb_buffer_stats_by_schema.frm b/db/sys/innodb_buffer_stats_by_schema.frm new file mode 100755 index 0000000..d642a52 --- /dev/null +++ b/db/sys/innodb_buffer_stats_by_schema.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,`sys`.`format_bytes`(sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED` = \'YES\',1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD` = \'YES\',1,NULL)) AS `pages_old`,round(sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +md5=178653a8e67a4b42359c7a859d5b8410 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139502004 +create-version=2 +source=SELECT IF(LOCATE(\'.\', ibp.table_name) = 0, \'InnoDB System\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', 1), \'`\', \'\')) AS object_schema,\n sys.format_bytes(SUM(IF(ibp.compressed_size = 0, 16384, compressed_size))) AS allocated,\n sys.format_bytes(SUM(ibp.data_size)) AS data,\n COUNT(ibp.page_number) AS pages,\n COUNT(IF(ibp.is_hashed = \'YES\', 1, NULL)) AS pages_hashed,\n COUNT(IF(ibp.is_old = \'YES\', 1, NULL)) AS pages_old,\n ROUND(SUM(ibp.number_records)/COUNT(DISTINCT ibp.index_name)) AS rows_cached\n FROM information_schema.innodb_buffer_page ibp\n WHERE table_name IS NOT NULL\n GROUP BY object_schema\n ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,`sys`.`format_bytes`(sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED` = \'YES\',1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD` = \'YES\',1,NULL)) AS `pages_old`,round(sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +mariadb-version=110502 diff --git a/db/sys/innodb_buffer_stats_by_table.frm b/db/sys/innodb_buffer_stats_by_table.frm new file mode 100755 index 0000000..1ef4f03 --- /dev/null +++ b/db/sys/innodb_buffer_stats_by_table.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') AS `object_name`,`sys`.`format_bytes`(sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED` = \'YES\',1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD` = \'YES\',1,NULL)) AS `pages_old`,round(sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')),replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +md5=5ddd96cfad4a231391cb2ea69bbaea79 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139515834 +create-version=2 +source=SELECT IF(LOCATE(\'.\', ibp.table_name) = 0, \'InnoDB System\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', 1), \'`\', \'\')) AS object_schema,\n REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', -1), \'`\', \'\') AS object_name,\n sys.format_bytes(SUM(IF(ibp.compressed_size = 0, 16384, compressed_size))) AS allocated,\n sys.format_bytes(SUM(ibp.data_size)) AS data,\n COUNT(ibp.page_number) AS pages,\n COUNT(IF(ibp.is_hashed = \'YES\', 1, NULL)) AS pages_hashed,\n COUNT(IF(ibp.is_old = \'YES\', 1, NULL)) AS pages_old,\n ROUND(SUM(ibp.number_records)/COUNT(DISTINCT ibp.index_name)) AS rows_cached\n FROM information_schema.innodb_buffer_page ibp\n WHERE table_name IS NOT NULL\n GROUP BY object_schema, object_name\n ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') AS `object_name`,`sys`.`format_bytes`(sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED` = \'YES\',1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD` = \'YES\',1,NULL)) AS `pages_old`,round(sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')),replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +mariadb-version=110502 diff --git a/db/sys/innodb_lock_waits.frm b/db/sys/innodb_lock_waits.frm new file mode 100755 index 0000000..ef2c960 --- /dev/null +++ b/db/sys/innodb_lock_waits.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `r`.`trx_wait_started` AS `wait_started`,timediff(current_timestamp(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,current_timestamp()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(current_timestamp(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`sys`.`format_statement`(`r`.`trx_query`) AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`sys`.`format_statement`(`b`.`trx_query`) AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(current_timestamp(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat(\'KILL QUERY \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat(\'KILL \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on(`b`.`trx_id` = `w`.`blocking_trx_id`)) join `information_schema`.`innodb_trx` `r` on(`r`.`trx_id` = `w`.`requesting_trx_id`)) join `information_schema`.`innodb_locks` `bl` on(`bl`.`lock_id` = `w`.`blocking_lock_id`)) join `information_schema`.`innodb_locks` `rl` on(`rl`.`lock_id` = `w`.`requested_lock_id`)) order by `r`.`trx_wait_started` +md5=0fb2774411abbf295a443273d6c9e7c5 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139531894 +create-version=2 +source=SELECT r.trx_wait_started AS wait_started,\n TIMEDIFF(NOW(), r.trx_wait_started) AS wait_age,\n TIMESTAMPDIFF(SECOND, r.trx_wait_started, NOW()) AS wait_age_secs,\n rl.lock_table AS locked_table,\n rl.lock_index AS locked_index,\n rl.lock_type AS locked_type,\n r.trx_id AS waiting_trx_id,\n r.trx_started as waiting_trx_started,\n TIMEDIFF(NOW(), r.trx_started) AS waiting_trx_age,\n r.trx_rows_locked AS waiting_trx_rows_locked,\n r.trx_rows_modified AS waiting_trx_rows_modified,\n r.trx_mysql_thread_id AS waiting_pid,\n sys.format_statement(r.trx_query) AS waiting_query,\n rl.lock_id AS waiting_lock_id,\n rl.lock_mode AS waiting_lock_mode,\n b.trx_id AS blocking_trx_id,\n b.trx_mysql_thread_id AS blocking_pid,\n sys.format_statement(b.trx_query) AS blocking_query,\n bl.lock_id AS blocking_lock_id,\n bl.lock_mode AS blocking_lock_mode,\n b.trx_started AS blocking_trx_started,\n TIMEDIFF(NOW(), b.trx_started) AS blocking_trx_age,\n b.trx_rows_locked AS blocking_trx_rows_locked,\n b.trx_rows_modified AS blocking_trx_rows_modified,\n CONCAT(\'KILL QUERY \', b.trx_mysql_thread_id) AS sql_kill_blocking_query,\n CONCAT(\'KILL \', b.trx_mysql_thread_id) AS sql_kill_blocking_connection\n FROM information_schema.innodb_lock_waits w\n INNER JOIN information_schema.innodb_trx b ON b.trx_id = w.blocking_trx_id\n INNER JOIN information_schema.innodb_trx r ON r.trx_id = w.requesting_trx_id\n INNER JOIN information_schema.innodb_locks bl ON bl.lock_id = w.blocking_lock_id\n INNER JOIN information_schema.innodb_locks rl ON rl.lock_id = w.requested_lock_id\n ORDER BY r.trx_wait_started; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `r`.`trx_wait_started` AS `wait_started`,timediff(current_timestamp(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,current_timestamp()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(current_timestamp(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`sys`.`format_statement`(`r`.`trx_query`) AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`sys`.`format_statement`(`b`.`trx_query`) AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(current_timestamp(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat(\'KILL QUERY \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat(\'KILL \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on(`b`.`trx_id` = `w`.`blocking_trx_id`)) join `information_schema`.`innodb_trx` `r` on(`r`.`trx_id` = `w`.`requesting_trx_id`)) join `information_schema`.`innodb_locks` `bl` on(`bl`.`lock_id` = `w`.`blocking_lock_id`)) join `information_schema`.`innodb_locks` `rl` on(`rl`.`lock_id` = `w`.`requested_lock_id`)) order by `r`.`trx_wait_started` +mariadb-version=110502 diff --git a/db/sys/io_by_thread_by_latency.frm b/db/sys/io_by_thread_by_latency.frm new file mode 100755 index 0000000..8cd1c0b --- /dev/null +++ b/db/sys/io_by_thread_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`)) AS `avg_latency`,format_pico_time(max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) where `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0 group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=fcc6525c06e21b5428f352f4bfcf37f0 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139601952 +create-version=2 +source=SELECT IF(processlist_id IS NULL,\n SUBSTRING_INDEX(name, \'/\', -1),\n CONCAT(processlist_user, \'@\', processlist_host)\n ) user,\n SUM(count_star) total,\n format_pico_time(SUM(sum_timer_wait)) total_latency,\n format_pico_time(MIN(min_timer_wait)) min_latency,\n format_pico_time(AVG(avg_timer_wait)) avg_latency,\n format_pico_time(MAX(max_timer_wait)) max_latency,\n thread_id,\n processlist_id\n FROM performance_schema.events_waits_summary_by_thread_by_event_name\n LEFT JOIN performance_schema.threads USING (thread_id)\n WHERE event_name LIKE \'wait/io/file/%\'\n AND sum_timer_wait > 0\n GROUP BY thread_id, processlist_id, user\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`)) AS `avg_latency`,format_pico_time(max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) where `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0 group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/io_global_by_file_by_bytes.frm b/db/sys/io_global_by_file_by_bytes.frm new file mode 100755 index 0000000..b88d1de --- /dev/null +++ b/db/sys/io_global_by_file_by_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0),0.00)) AS `avg_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total`,ifnull(round(100 - `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`,0) * 100,2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` desc +md5=a74849867ba5e2829284aa8d8254bd71 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139615440 +create-version=2 +source=SELECT sys.format_path(file_name) AS file,\n count_read,\n sys.format_bytes(sum_number_of_bytes_read) AS total_read,\n sys.format_bytes(IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0)) AS avg_read,\n count_write,\n sys.format_bytes(sum_number_of_bytes_write) AS total_written,\n sys.format_bytes(IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0.00)) AS avg_write,\n sys.format_bytes(sum_number_of_bytes_read + sum_number_of_bytes_write) AS total,\n IFNULL(ROUND(100-((sum_number_of_bytes_read/ NULLIF((sum_number_of_bytes_read+sum_number_of_bytes_write), 0))*100), 2), 0.00) AS write_pct\n FROM performance_schema.file_summary_by_instance\n ORDER BY sum_number_of_bytes_read + sum_number_of_bytes_write DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0),0.00)) AS `avg_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total`,ifnull(round(100 - `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`,0) * 100,2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` desc +mariadb-version=110502 diff --git a/db/sys/io_global_by_file_by_latency.frm b/db/sys/io_global_by_file_by_latency.frm new file mode 100755 index 0000000..7d4ca87 --- /dev/null +++ b/db/sys/io_global_by_file_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc +md5=10e6e843da56650b0f41bda3755bf3a5 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139630311 +create-version=2 +source=SELECT sys.format_path(file_name) AS file,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n count_read,\n format_pico_time(sum_timer_read) AS read_latency,\n count_write,\n format_pico_time(sum_timer_write) AS write_latency,\n count_misc,\n format_pico_time(sum_timer_misc) AS misc_latency\n FROM performance_schema.file_summary_by_instance\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_path`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,format_pico_time(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/io_global_by_wait_by_bytes.frm b/db/sys/io_global_by_wait_by_bytes.frm new file mode 100755 index 0000000..df7c83c --- /dev/null +++ b/db/sys/io_global_by_wait_by_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0)) AS `avg_written`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` desc +md5=7d930288769a3b345117191a1542af8e +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139645215 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(min_timer_wait) AS min_latency,\n format_pico_time(avg_timer_wait) AS avg_latency,\n format_pico_time(max_timer_wait) AS max_latency,\n count_read,\n sys.format_bytes(sum_number_of_bytes_read) AS total_read,\n sys.format_bytes(IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0)) AS avg_read,\n count_write,\n sys.format_bytes(sum_number_of_bytes_write) AS total_written,\n sys.format_bytes(IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0)) AS avg_written,\n sys.format_bytes(sum_number_of_bytes_write + sum_number_of_bytes_read) AS total_requested\n FROM performance_schema.file_summary_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n AND count_star > 0\n ORDER BY sum_number_of_bytes_write + sum_number_of_bytes_read DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0)) AS `avg_written`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` desc +mariadb-version=110502 diff --git a/db/sys/io_global_by_wait_by_latency.frm b/db/sys/io_global_by_wait_by_latency.frm new file mode 100755 index 0000000..cb6d918 --- /dev/null +++ b/db/sys/io_global_by_wait_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ`) AS `read_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE`) AS `write_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC`) AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0)) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc +md5=0272cfa47514b02ded601f6f9cf04fb0 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139656949 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) AS event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency,\n format_pico_time(max_timer_wait) AS max_latency,\n format_pico_time(sum_timer_read) AS read_latency,\n format_pico_time(sum_timer_write) AS write_latency,\n format_pico_time(sum_timer_misc) AS misc_latency,\n count_read,\n sys.format_bytes(sum_number_of_bytes_read) AS total_read,\n sys.format_bytes(IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0)) AS avg_read,\n count_write,\n sys.format_bytes(sum_number_of_bytes_write) AS total_written,\n sys.format_bytes(IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0)) AS avg_written\n FROM performance_schema.file_summary_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n AND count_star > 0\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ`) AS `read_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE`) AS `write_latency`,format_pico_time(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC`) AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ`) AS `total_read`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0)) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`sys`.`format_bytes`(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `total_written`,`sys`.`format_bytes`(ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0)) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/latest_file_io.frm b/db/sys/latest_file_io.frm new file mode 100755 index 0000000..0c4b728 --- /dev/null +++ b/db/sys/latest_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`information_schema`.`processlist`.`ID` is null,concat(substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),\':\',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,\'@\',`information_schema`.`processlist`.`HOST`,\':\',`information_schema`.`processlist`.`ID`)) AS `thread`,`sys`.`format_path`(`performance_schema`.`events_waits_history_long`.`OBJECT_NAME`) AS `file`,format_pico_time(`performance_schema`.`events_waits_history_long`.`TIMER_WAIT`) AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`sys`.`format_bytes`(`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES`) AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on(`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) left join `information_schema`.`processlist` on(`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`)) where `performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null and `performance_schema`.`events_waits_history_long`.`EVENT_NAME` like \'wait/io/file/%\' order by `performance_schema`.`events_waits_history_long`.`TIMER_START` +md5=4f9e863887722ac7347d18738c55e5cb +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139588200 +create-version=2 +source=SELECT IF(id IS NULL,\n CONCAT(SUBSTRING_INDEX(name, \'/\', -1), \':\', thread_id),\n CONCAT(user, \'@\', host, \':\', id)\n ) thread,\n sys.format_path(object_name) file,\n format_pico_time(timer_wait) AS latency,\n operation,\n sys.format_bytes(number_of_bytes) AS requested\n FROM performance_schema.events_waits_history_long\n JOIN performance_schema.threads USING (thread_id)\n LEFT JOIN information_schema.processlist ON processlist_id = id\n WHERE object_name IS NOT NULL\n AND event_name LIKE \'wait/io/file/%\'\n ORDER BY timer_start; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`information_schema`.`processlist`.`ID` is null,concat(substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),\':\',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,\'@\',`information_schema`.`processlist`.`HOST`,\':\',`information_schema`.`processlist`.`ID`)) AS `thread`,`sys`.`format_path`(`performance_schema`.`events_waits_history_long`.`OBJECT_NAME`) AS `file`,format_pico_time(`performance_schema`.`events_waits_history_long`.`TIMER_WAIT`) AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`sys`.`format_bytes`(`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES`) AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on(`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) left join `information_schema`.`processlist` on(`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`)) where `performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null and `performance_schema`.`events_waits_history_long`.`EVENT_NAME` like \'wait/io/file/%\' order by `performance_schema`.`events_waits_history_long`.`TIMER_START` +mariadb-version=110502 diff --git a/db/sys/memory_by_host_by_current_bytes.frm b/db/sys/memory_by_host_by_current_bytes.frm new file mode 100755 index 0000000..13c44cb --- /dev/null +++ b/db/sys/memory_by_host_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=93c91e80e1a600b69b90e1a671a15ed6 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139683122 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(current_count_used) AS current_count_used,\n sys.format_bytes(SUM(current_number_of_bytes_used)) AS current_allocated,\n sys.format_bytes(IFNULL(SUM(current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0)) AS current_avg_alloc,\n sys.format_bytes(MAX(current_number_of_bytes_used)) AS current_max_alloc,\n sys.format_bytes(SUM(sum_number_of_bytes_alloc)) AS total_allocated\n FROM performance_schema.memory_summary_by_host_by_event_name\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/memory_by_thread_by_current_bytes.frm b/db/sys/memory_by_thread_by_current_bytes.frm new file mode 100755 index 0000000..7203117 --- /dev/null +++ b/db/sys/memory_by_thread_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `mt`.`THREAD_ID` AS `thread_id`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on(`mt`.`THREAD_ID` = `t`.`THREAD_ID`)) group by `mt`.`THREAD_ID`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=bae940445aa2189841198ee54ad4ff09 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139696727 +create-version=2 +source=SELECT thread_id,\n IF(t.name = \'thread/sql/one_connection\',\n CONCAT(t.processlist_user, \'@\', t.processlist_host),\n REPLACE(t.name, \'thread/\', \'\')) user,\n SUM(mt.current_count_used) AS current_count_used,\n sys.format_bytes(SUM(mt.current_number_of_bytes_used)) AS current_allocated,\n sys.format_bytes(IFNULL(SUM(mt.current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0)) AS current_avg_alloc,\n sys.format_bytes(MAX(mt.current_number_of_bytes_used)) AS current_max_alloc,\n sys.format_bytes(SUM(mt.sum_number_of_bytes_alloc)) AS total_allocated\n FROM performance_schema.memory_summary_by_thread_by_event_name AS mt\n JOIN performance_schema.threads AS t USING (thread_id)\n GROUP BY thread_id, IF(t.name = \'thread/sql/one_connection\',\n CONCAT(t.processlist_user, \'@\', t.processlist_host),\n REPLACE(t.name, \'thread/\', \'\'))\n ORDER BY SUM(current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `mt`.`THREAD_ID` AS `thread_id`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on(`mt`.`THREAD_ID` = `t`.`THREAD_ID`)) group by `mt`.`THREAD_ID`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/memory_by_user_by_current_bytes.frm b/db/sys/memory_by_user_by_current_bytes.frm new file mode 100755 index 0000000..b93bd2f --- /dev/null +++ b/db/sys/memory_by_user_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=f057d6d83c301f761890986ff9b2a9a2 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139670190 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(current_count_used) AS current_count_used,\n sys.format_bytes(SUM(current_number_of_bytes_used)) AS current_allocated,\n sys.format_bytes(IFNULL(SUM(current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0)) AS current_avg_alloc,\n sys.format_bytes(MAX(current_number_of_bytes_used)) AS current_max_alloc,\n sys.format_bytes(SUM(sum_number_of_bytes_alloc)) AS total_allocated\n FROM performance_schema.memory_summary_by_user_by_event_name\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/memory_global_by_current_bytes.frm b/db/sys/memory_global_by_current_bytes.frm new file mode 100755 index 0000000..78b53f9 --- /dev/null +++ b/db/sys/memory_global_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_alloc`,`sys`.`format_bytes`(ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0),0)) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED`) AS `high_alloc`,`sys`.`format_bytes`(ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0),0)) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0 order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc +md5=e5638aa4612faf9c663f68742eb47175 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139710024 +create-version=2 +source=SELECT event_name,\n current_count_used AS current_count,\n sys.format_bytes(current_number_of_bytes_used) AS current_alloc,\n sys.format_bytes(IFNULL(current_number_of_bytes_used / NULLIF(current_count_used, 0), 0)) AS current_avg_alloc,\n high_count_used AS high_count,\n sys.format_bytes(high_number_of_bytes_used) AS high_alloc,\n sys.format_bytes(IFNULL(high_number_of_bytes_used / NULLIF(high_count_used, 0), 0)) AS high_avg_alloc\n FROM performance_schema.memory_summary_global_by_event_name\n WHERE current_number_of_bytes_used > 0\n ORDER BY current_number_of_bytes_used DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_alloc`,`sys`.`format_bytes`(ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0),0)) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`sys`.`format_bytes`(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED`) AS `high_alloc`,`sys`.`format_bytes`(ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0),0)) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0 order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc +mariadb-version=110502 diff --git a/db/sys/memory_global_total.frm b/db/sys/memory_global_total.frm new file mode 100755 index 0000000..4bb4244 --- /dev/null +++ b/db/sys/memory_global_total.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name` +md5=8082fddb38d6165c0d33b88815ddf3d8 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139720964 +create-version=2 +source=SELECT sys.format_bytes(SUM(CURRENT_NUMBER_OF_BYTES_USED)) total_allocated\n FROM performance_schema.memory_summary_global_by_event_name; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_bytes`(sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name` +mariadb-version=110502 diff --git a/db/sys/metrics.frm b/db/sys/metrics.frm new file mode 100755 index 0000000..e027a45 --- /dev/null +++ b/db/sys/metrics.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=(select lcase(`performance_schema`.`global_status`.`VARIABLE_NAME`) AS `Variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `Variable_value`,\'Global Status\' AS `Type`,\'YES\' AS `Enabled` from `performance_schema`.`global_status`) union all (select `information_schema`.`INNODB_METRICS`.`NAME` AS `Variable_name`,`information_schema`.`INNODB_METRICS`.`COUNT` AS `Variable_value`,concat(\'InnoDB Metrics - \',`information_schema`.`INNODB_METRICS`.`SUBSYSTEM`) AS `Type`,\'YES\' AS `Enabled` from `information_schema`.`INNODB_METRICS` where `information_schema`.`INNODB_METRICS`.`NAME` not in (\'lock_row_lock_time\',\'lock_row_lock_time_avg\',\'lock_row_lock_time_max\',\'lock_row_lock_waits\',\'buffer_pool_reads\',\'buffer_pool_read_requests\',\'buffer_pool_write_requests\',\'buffer_pool_wait_free\',\'buffer_pool_read_ahead\',\'buffer_pool_read_ahead_evicted\',\'buffer_pool_pages_total\',\'buffer_pool_pages_misc\',\'buffer_pool_pages_data\',\'buffer_pool_bytes_data\',\'buffer_pool_pages_dirty\',\'buffer_pool_bytes_dirty\',\'buffer_pool_pages_free\',\'buffer_pages_created\',\'buffer_pages_written\',\'buffer_pages_read\',\'buffer_data_reads\',\'buffer_data_written\',\'file_num_open_files\',\'os_log_bytes_written\',\'os_log_fsyncs\',\'os_log_pending_fsyncs\',\'os_log_pending_writes\',\'log_waits\',\'log_write_requests\',\'log_writes\',\'innodb_dblwr_writes\',\'innodb_dblwr_pages_written\',\'innodb_page_size\')) union all (select \'NOW()\' AS `Variable_name`,current_timestamp(3) AS `Variable_value`,\'System Time\' AS `Type`,\'YES\' AS `Enabled`) union all (select \'UNIX_TIMESTAMP()\' AS `Variable_name`,round(unix_timestamp(current_timestamp(3)),3) AS `Variable_value`,\'System Time\' AS `Type`,\'YES\' AS `Enabled`) order by `Type`,`Variable_name` +md5=1985a0523a55c70bfd300229b6b05d03 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140159622 +create-version=2 +source=(\nSELECT LOWER(VARIABLE_NAME) AS Variable_name, VARIABLE_VALUE AS Variable_value, \'Global Status\' AS Type, \'YES\' AS Enabled\n FROM performance_schema.global_status\n) UNION ALL (\nSELECT NAME AS Variable_name, COUNT AS Variable_value,\n CONCAT(\'InnoDB Metrics - \', SUBSYSTEM) AS Type,\n \'YES\' AS Enabled\n FROM information_schema.INNODB_METRICS\n WHERE NAME NOT IN (\n \'lock_row_lock_time\', \'lock_row_lock_time_avg\', \'lock_row_lock_time_max\', \'lock_row_lock_waits\',\n \'buffer_pool_reads\', \'buffer_pool_read_requests\', \'buffer_pool_write_requests\', \'buffer_pool_wait_free\',\n \'buffer_pool_read_ahead\', \'buffer_pool_read_ahead_evicted\', \'buffer_pool_pages_total\', \'buffer_pool_pages_misc\',\n \'buffer_pool_pages_data\', \'buffer_pool_bytes_data\', \'buffer_pool_pages_dirty\', \'buffer_pool_bytes_dirty\',\n \'buffer_pool_pages_free\', \'buffer_pages_created\', \'buffer_pages_written\', \'buffer_pages_read\',\n \'buffer_data_reads\', \'buffer_data_written\', \'file_num_open_files\',\n \'os_log_bytes_written\', \'os_log_fsyncs\', \'os_log_pending_fsyncs\', \'os_log_pending_writes\',\n \'log_waits\', \'log_write_requests\', \'log_writes\', \'innodb_dblwr_writes\', \'innodb_dblwr_pages_written\', \'innodb_page_size\')\n) \n UNION ALL (\nSELECT \'NOW()\' AS Variable_name, NOW(3) AS Variable_value, \'System Time\' AS Type, \'YES\' AS Enabled\n) UNION ALL (\nSELECT \'UNIX_TIMESTAMP()\' AS Variable_name, ROUND(UNIX_TIMESTAMP(NOW(3)), 3) AS Variable_value, \'System Time\' AS Type, \'YES\' AS Enabled\n)\n ORDER BY Type, Variable_name; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=(select lcase(`performance_schema`.`global_status`.`VARIABLE_NAME`) AS `Variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `Variable_value`,\'Global Status\' AS `Type`,\'YES\' AS `Enabled` from `performance_schema`.`global_status`) union all (select `information_schema`.`INNODB_METRICS`.`NAME` AS `Variable_name`,`information_schema`.`INNODB_METRICS`.`COUNT` AS `Variable_value`,concat(\'InnoDB Metrics - \',`information_schema`.`INNODB_METRICS`.`SUBSYSTEM`) AS `Type`,\'YES\' AS `Enabled` from `information_schema`.`INNODB_METRICS` where `information_schema`.`INNODB_METRICS`.`NAME` not in (\'lock_row_lock_time\',\'lock_row_lock_time_avg\',\'lock_row_lock_time_max\',\'lock_row_lock_waits\',\'buffer_pool_reads\',\'buffer_pool_read_requests\',\'buffer_pool_write_requests\',\'buffer_pool_wait_free\',\'buffer_pool_read_ahead\',\'buffer_pool_read_ahead_evicted\',\'buffer_pool_pages_total\',\'buffer_pool_pages_misc\',\'buffer_pool_pages_data\',\'buffer_pool_bytes_data\',\'buffer_pool_pages_dirty\',\'buffer_pool_bytes_dirty\',\'buffer_pool_pages_free\',\'buffer_pages_created\',\'buffer_pages_written\',\'buffer_pages_read\',\'buffer_data_reads\',\'buffer_data_written\',\'file_num_open_files\',\'os_log_bytes_written\',\'os_log_fsyncs\',\'os_log_pending_fsyncs\',\'os_log_pending_writes\',\'log_waits\',\'log_write_requests\',\'log_writes\',\'innodb_dblwr_writes\',\'innodb_dblwr_pages_written\',\'innodb_page_size\')) union all (select \'NOW()\' AS `Variable_name`,current_timestamp(3) AS `Variable_value`,\'System Time\' AS `Type`,\'YES\' AS `Enabled`) union all (select \'UNIX_TIMESTAMP()\' AS `Variable_name`,round(unix_timestamp(current_timestamp(3)),3) AS `Variable_value`,\'System Time\' AS `Type`,\'YES\' AS `Enabled`) order by `Type`,`Variable_name` +mariadb-version=110502 diff --git a/db/sys/privileges_by_table_by_level.frm b/db/sys/privileges_by_table_by_level.frm new file mode 100755 index 0000000..901bb53 --- /dev/null +++ b/db/sys/privileges_by_table_by_level.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `t`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`t`.`TABLE_NAME` AS `TABLE_NAME`,`privs`.`GRANTEE` AS `GRANTEE`,`privs`.`PRIVILEGE_TYPE` AS `PRIVILEGE`,`privs`.`LEVEL` AS `LEVEL` from (`INFORMATION_SCHEMA`.`TABLES` `t` join (select NULL AS `TABLE_SCHEMA`,NULL AS `TABLE_NAME`,`information_schema`.`USER_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`USER_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'GLOBAL\' AS `LEVEL` from `INFORMATION_SCHEMA`.`USER_PRIVILEGES` union select `information_schema`.`SCHEMA_PRIVILEGES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,NULL AS `TABLE_NAME`,`information_schema`.`SCHEMA_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`SCHEMA_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'SCHEMA\' AS `LEVEL` from `INFORMATION_SCHEMA`.`SCHEMA_PRIVILEGES` union select `information_schema`.`TABLE_PRIVILEGES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`TABLE_PRIVILEGES`.`TABLE_NAME` AS `TABLE_NAME`,`information_schema`.`TABLE_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`TABLE_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'TABLE\' AS `LEVEL` from `INFORMATION_SCHEMA`.`TABLE_PRIVILEGES`) `privs` on((`t`.`TABLE_SCHEMA` = `privs`.`TABLE_SCHEMA` or `privs`.`TABLE_SCHEMA` is null) and (`t`.`TABLE_NAME` = `privs`.`TABLE_NAME` or `privs`.`TABLE_NAME` is null) and `privs`.`PRIVILEGE_TYPE` in (\'SELECT\',\'INSERT\',\'UPDATE\',\'DELETE\',\'CREATE\',\'ALTER\',\'DROP\',\'INDEX\',\'REFERENCES\',\'TRIGGER\',\'GRANT OPTION\',\'SHOW VIEW\',\'DELETE HISTORY\'))) where `t`.`TABLE_SCHEMA` not in (\'sys\',\'mysql\',\'information_schema\',\'performance_schema\') +md5=990f2dc951d82fc270bfa915549771f0 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139574242 +create-version=2 +source=SELECT t.TABLE_SCHEMA,\n t.TABLE_NAME,\n privs.GRANTEE,\n privs.PRIVILEGE_TYPE,\n privs.LEVEL\nFROM INFORMATION_SCHEMA.TABLES AS t\nJOIN ( SELECT NULL AS TABLE_SCHEMA,\n NULL AS TABLE_NAME,\n GRANTEE,\n PRIVILEGE_TYPE,\n \'GLOBAL\' LEVEL\n FROM INFORMATION_SCHEMA.USER_PRIVILEGES\n UNION\n SELECT TABLE_SCHEMA,\n NULL AS TABLE_NAME,\n GRANTEE,\n PRIVILEGE_TYPE,\n \'SCHEMA\' LEVEL\n FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES\n UNION\n SELECT TABLE_SCHEMA,\n TABLE_NAME,\n GRANTEE,\n PRIVILEGE_TYPE,\n \'TABLE\' LEVEL\n FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES\n ) privs\n ON (t.TABLE_SCHEMA = privs.TABLE_SCHEMA OR privs.TABLE_SCHEMA IS NULL)\n AND (t.TABLE_NAME = privs.TABLE_NAME OR privs.TABLE_NAME IS NULL)\n AND privs.PRIVILEGE_TYPE IN (\'SELECT\', \'INSERT\', \'UPDATE\', \'DELETE\',\n \'CREATE\', \'ALTER\', \'DROP\', \'INDEX\',\n \'REFERENCES\', \'TRIGGER\', \'GRANT OPTION\',\n \'SHOW VIEW\', \'DELETE HISTORY\')\nWHERE t.TABLE_SCHEMA NOT IN (\'sys\', \'mysql\',\'information_schema\',\n \'performance_schema\'); +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `t`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`t`.`TABLE_NAME` AS `TABLE_NAME`,`privs`.`GRANTEE` AS `GRANTEE`,`privs`.`PRIVILEGE_TYPE` AS `PRIVILEGE`,`privs`.`LEVEL` AS `LEVEL` from (`INFORMATION_SCHEMA`.`TABLES` `t` join (select NULL AS `TABLE_SCHEMA`,NULL AS `TABLE_NAME`,`information_schema`.`USER_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`USER_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'GLOBAL\' AS `LEVEL` from `INFORMATION_SCHEMA`.`USER_PRIVILEGES` union select `information_schema`.`SCHEMA_PRIVILEGES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,NULL AS `TABLE_NAME`,`information_schema`.`SCHEMA_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`SCHEMA_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'SCHEMA\' AS `LEVEL` from `INFORMATION_SCHEMA`.`SCHEMA_PRIVILEGES` union select `information_schema`.`TABLE_PRIVILEGES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`TABLE_PRIVILEGES`.`TABLE_NAME` AS `TABLE_NAME`,`information_schema`.`TABLE_PRIVILEGES`.`GRANTEE` AS `GRANTEE`,`information_schema`.`TABLE_PRIVILEGES`.`PRIVILEGE_TYPE` AS `PRIVILEGE_TYPE`,\'TABLE\' AS `LEVEL` from `INFORMATION_SCHEMA`.`TABLE_PRIVILEGES`) `privs` on((`t`.`TABLE_SCHEMA` = `privs`.`TABLE_SCHEMA` or `privs`.`TABLE_SCHEMA` is null) and (`t`.`TABLE_NAME` = `privs`.`TABLE_NAME` or `privs`.`TABLE_NAME` is null) and `privs`.`PRIVILEGE_TYPE` in (\'SELECT\',\'INSERT\',\'UPDATE\',\'DELETE\',\'CREATE\',\'ALTER\',\'DROP\',\'INDEX\',\'REFERENCES\',\'TRIGGER\',\'GRANT OPTION\',\'SHOW VIEW\',\'DELETE HISTORY\'))) where `t`.`TABLE_SCHEMA` not in (\'sys\',\'mysql\',\'information_schema\',\'performance_schema\') +mariadb-version=110502 diff --git a/db/sys/processlist.frm b/db/sys/processlist.frm new file mode 100755 index 0000000..895e915 --- /dev/null +++ b/db/sys/processlist.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if(`pps`.`NAME` = \'thread/sql/one_connection\',concat(`pps`.`PROCESSLIST_USER`,\'@\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\'thread/\',\'\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(`esc`.`END_EVENT_ID` is null,format_pico_time(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(`esc`.`END_EVENT_ID` is null,round(100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`),2),NULL) AS `progress`,format_pico_time(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(`esc`.`NO_GOOD_INDEX_USED` > 0 or `esc`.`NO_INDEX_USED` > 0,\'YES\',\'NO\') AS `full_scan`,if(`esc`.`END_EVENT_ID` is not null,`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if(`esc`.`END_EVENT_ID` is not null,format_pico_time(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',format_pico_time(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,format_pico_time(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on(`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`)) left join `performance_schema`.`events_stages_current` `estc` on(`pps`.`THREAD_ID` = `estc`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `esc` on(`pps`.`THREAD_ID` = `esc`.`THREAD_ID`)) left join `performance_schema`.`events_transactions_current` `etc` on(`pps`.`THREAD_ID` = `etc`.`THREAD_ID`)) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on(`pps`.`THREAD_ID` = `mem`.`thread_id`)) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_pid`.`ATTR_NAME` = \'_pid\')) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_progname`.`ATTR_NAME` = \'program_name\')) order by `pps`.`PROCESSLIST_TIME` desc,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',format_pico_time(`ewc`.`TIMER_WAIT`)) desc +md5=83a8094a609aeaecda720b5ff342da2f +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140171390 +create-version=2 +source=SELECT pps.thread_id AS thd_id,\n pps.processlist_id AS conn_id,\n IF(pps.name = \'thread/sql/one_connection\',\n CONCAT(pps.processlist_user, \'@\', pps.processlist_host),\n REPLACE(pps.name, \'thread/\', \'\')) user,\n pps.processlist_db AS db,\n pps.processlist_command AS command,\n pps.processlist_state AS state,\n pps.processlist_time AS time,\n sys.format_statement(pps.processlist_info) AS current_statement,\n IF(esc.end_event_id IS NULL,\n format_pico_time(esc.timer_wait),\n NULL) AS statement_latency,\n IF(esc.end_event_id IS NULL,\n ROUND(100 * (estc.work_completed / estc.work_estimated), 2),\n NULL) AS progress,\n format_pico_time(esc.lock_time) AS lock_latency,\n esc.rows_examined AS rows_examined,\n esc.rows_sent AS rows_sent,\n esc.rows_affected AS rows_affected,\n esc.created_tmp_tables AS tmp_tables,\n esc.created_tmp_disk_tables AS tmp_disk_tables,\n IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0, \'YES\', \'NO\') AS full_scan,\n IF(esc.end_event_id IS NOT NULL,\n sys.format_statement(esc.sql_text),\n NULL) AS last_statement,\n IF(esc.end_event_id IS NOT NULL,\n format_pico_time(esc.timer_wait),\n NULL) AS last_statement_latency,\n sys.format_bytes(mem.current_allocated) AS current_memory,\n ewc.event_name AS last_wait,\n IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL,\n \'Still Waiting\',\n format_pico_time(ewc.timer_wait)) last_wait_latency,\n ewc.source,\n format_pico_time(etc.timer_wait) AS trx_latency,\n etc.state AS trx_state,\n etc.autocommit AS trx_autocommit,\n conattr_pid.attr_value as pid,\n conattr_progname.attr_value as program_name\n FROM performance_schema.threads AS pps\n LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id)\n LEFT JOIN performance_schema.events_stages_current AS estc USING (thread_id)\n LEFT JOIN performance_schema.events_statements_current AS esc USING (thread_id)\n LEFT JOIN performance_schema.events_transactions_current AS etc USING (thread_id)\n LEFT JOIN sys.x$memory_by_thread_by_current_bytes AS mem USING (thread_id)\n LEFT JOIN performance_schema.session_connect_attrs AS conattr_pid\n ON conattr_pid.processlist_id=pps.processlist_id and conattr_pid.attr_name=\'_pid\'\n LEFT JOIN performance_schema.session_connect_attrs AS conattr_progname\n ON conattr_progname.processlist_id=pps.processlist_id and conattr_progname.attr_name=\'program_name\'\n ORDER BY pps.processlist_time DESC, last_wait_latency DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if(`pps`.`NAME` = \'thread/sql/one_connection\',concat(`pps`.`PROCESSLIST_USER`,\'@\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\'thread/\',\'\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(`esc`.`END_EVENT_ID` is null,format_pico_time(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(`esc`.`END_EVENT_ID` is null,round(100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`),2),NULL) AS `progress`,format_pico_time(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(`esc`.`NO_GOOD_INDEX_USED` > 0 or `esc`.`NO_INDEX_USED` > 0,\'YES\',\'NO\') AS `full_scan`,if(`esc`.`END_EVENT_ID` is not null,`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if(`esc`.`END_EVENT_ID` is not null,format_pico_time(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',format_pico_time(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,format_pico_time(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on(`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`)) left join `performance_schema`.`events_stages_current` `estc` on(`pps`.`THREAD_ID` = `estc`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `esc` on(`pps`.`THREAD_ID` = `esc`.`THREAD_ID`)) left join `performance_schema`.`events_transactions_current` `etc` on(`pps`.`THREAD_ID` = `etc`.`THREAD_ID`)) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on(`pps`.`THREAD_ID` = `mem`.`thread_id`)) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_pid`.`ATTR_NAME` = \'_pid\')) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_progname`.`ATTR_NAME` = \'program_name\')) order by `pps`.`PROCESSLIST_TIME` desc,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',format_pico_time(`ewc`.`TIMER_WAIT`)) desc +mariadb-version=110502 diff --git a/db/sys/ps_check_lost_instrumentation.frm b/db/sys/ps_check_lost_instrumentation.frm new file mode 100755 index 0000000..98df4cb --- /dev/null +++ b/db/sys/ps_check_lost_instrumentation.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`global_status`.`VARIABLE_NAME` AS `variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `variable_value` from `performance_schema`.`global_status` where `performance_schema`.`global_status`.`VARIABLE_NAME` like \'perf%lost\' and `performance_schema`.`global_status`.`VARIABLE_VALUE` > 0 +md5=c734b24ae48c36b59fc217e2407acb24 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139580357 +create-version=2 +source=SELECT variable_name, variable_value\n FROM performance_schema.global_status\n WHERE variable_name LIKE \'perf%lost\'\n AND variable_value > 0; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`global_status`.`VARIABLE_NAME` AS `variable_name`,`performance_schema`.`global_status`.`VARIABLE_VALUE` AS `variable_value` from `performance_schema`.`global_status` where `performance_schema`.`global_status`.`VARIABLE_NAME` like \'perf%lost\' and `performance_schema`.`global_status`.`VARIABLE_VALUE` > 0 +mariadb-version=110502 diff --git a/db/sys/schema_auto_increment_columns.frm b/db/sys/schema_auto_increment_columns.frm new file mode 100755 index 0000000..00dbb59 --- /dev/null +++ b/db/sys/schema_auto_increment_columns.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `information_schema`.`COLUMNS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`COLUMNS`.`TABLE_NAME` AS `table_name`,`information_schema`.`COLUMNS`.`COLUMN_NAME` AS `column_name`,`information_schema`.`COLUMNS`.`DATA_TYPE` AS `data_type`,`information_schema`.`COLUMNS`.`COLUMN_TYPE` AS `column_type`,locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) = 0 AS `is_signed`,locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0 AS `is_unsigned`,case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1) AS `max_value`,`information_schema`.`TABLES`.`AUTO_INCREMENT` AS `auto_increment`,`information_schema`.`TABLES`.`AUTO_INCREMENT` / (case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1)) AS `auto_increment_ratio` from (`INFORMATION_SCHEMA`.`COLUMNS` join `INFORMATION_SCHEMA`.`TABLES` on(`information_schema`.`COLUMNS`.`TABLE_SCHEMA` = `information_schema`.`TABLES`.`TABLE_SCHEMA` and `information_schema`.`COLUMNS`.`TABLE_NAME` = `information_schema`.`TABLES`.`TABLE_NAME`)) where `information_schema`.`COLUMNS`.`TABLE_SCHEMA` not in (\'mysql\',\'sys\',\'INFORMATION_SCHEMA\',\'performance_schema\') and `information_schema`.`TABLES`.`TABLE_TYPE` = \'BASE TABLE\' and `information_schema`.`COLUMNS`.`EXTRA` = \'auto_increment\' order by `information_schema`.`TABLES`.`AUTO_INCREMENT` / (case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1)) desc,case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1) +md5=ab5e94e312741ae240d3e4c23fb431b6 +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139552402 +create-version=2 +source=SELECT TABLE_SCHEMA,\n TABLE_NAME,\n COLUMN_NAME,\n DATA_TYPE,\n COLUMN_TYPE,\n (LOCATE(\'unsigned\', COLUMN_TYPE) = 0) AS is_signed,\n (LOCATE(\'unsigned\', COLUMN_TYPE) > 0) AS is_unsigned,\n (\n CASE DATA_TYPE\n WHEN \'tinyint\' THEN 255\n WHEN \'smallint\' THEN 65535\n WHEN \'mediumint\' THEN 16777215\n WHEN \'int\' THEN 4294967295\n WHEN \'bigint\' THEN 18446744073709551615\n END >> IF(LOCATE(\'unsigned\', COLUMN_TYPE) > 0, 0, 1)\n ) AS max_value,\n AUTO_INCREMENT,\n AUTO_INCREMENT / (\n CASE DATA_TYPE\n WHEN \'tinyint\' THEN 255\n WHEN \'smallint\' THEN 65535\n WHEN \'mediumint\' THEN 16777215\n WHEN \'int\' THEN 4294967295\n WHEN \'bigint\' THEN 18446744073709551615\n END >> IF(LOCATE(\'unsigned\', COLUMN_TYPE) > 0, 0, 1)\n ) AS auto_increment_ratio\n FROM INFORMATION_SCHEMA.COLUMNS\n INNER JOIN INFORMATION_SCHEMA.TABLES USING (TABLE_SCHEMA, TABLE_NAME)\n WHERE TABLE_SCHEMA NOT IN (\'mysql\', \'sys\', \'INFORMATION_SCHEMA\', \'performance_schema\')\n AND TABLE_TYPE=\'BASE TABLE\'\n AND EXTRA=\'auto_increment\'\n ORDER BY auto_increment_ratio DESC, max_value; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `information_schema`.`COLUMNS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`COLUMNS`.`TABLE_NAME` AS `table_name`,`information_schema`.`COLUMNS`.`COLUMN_NAME` AS `column_name`,`information_schema`.`COLUMNS`.`DATA_TYPE` AS `data_type`,`information_schema`.`COLUMNS`.`COLUMN_TYPE` AS `column_type`,locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) = 0 AS `is_signed`,locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0 AS `is_unsigned`,case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1) AS `max_value`,`information_schema`.`TABLES`.`AUTO_INCREMENT` AS `auto_increment`,`information_schema`.`TABLES`.`AUTO_INCREMENT` / (case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1)) AS `auto_increment_ratio` from (`INFORMATION_SCHEMA`.`COLUMNS` join `INFORMATION_SCHEMA`.`TABLES` on(`information_schema`.`COLUMNS`.`TABLE_SCHEMA` = `information_schema`.`TABLES`.`TABLE_SCHEMA` and `information_schema`.`COLUMNS`.`TABLE_NAME` = `information_schema`.`TABLES`.`TABLE_NAME`)) where `information_schema`.`COLUMNS`.`TABLE_SCHEMA` not in (\'mysql\',\'sys\',\'INFORMATION_SCHEMA\',\'performance_schema\') and `information_schema`.`TABLES`.`TABLE_TYPE` = \'BASE TABLE\' and `information_schema`.`COLUMNS`.`EXTRA` = \'auto_increment\' order by `information_schema`.`TABLES`.`AUTO_INCREMENT` / (case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1)) desc,case `information_schema`.`COLUMNS`.`DATA_TYPE` when \'tinyint\' then 255 when \'smallint\' then 65535 when \'mediumint\' then 16777215 when \'int\' then 4294967295 when \'bigint\' then 18446744073709551615 end >> if(locate(\'unsigned\',`information_schema`.`COLUMNS`.`COLUMN_TYPE`) > 0,0,1) +mariadb-version=110502 diff --git a/db/sys/schema_index_statistics.frm b/db/sys/schema_index_statistics.frm new file mode 100755 index 0000000..9d632fd --- /dev/null +++ b/db/sys/schema_index_statistics.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH`) AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE`) AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc +md5=c638e9eebe6bc7efa5fcb523399685de +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139735162 +create-version=2 +source=SELECT OBJECT_SCHEMA AS table_schema,\n OBJECT_NAME AS table_name,\n INDEX_NAME as index_name,\n COUNT_FETCH AS rows_selected,\n format_pico_time(SUM_TIMER_FETCH) AS select_latency,\n COUNT_INSERT AS rows_inserted,\n format_pico_time(SUM_TIMER_INSERT) AS insert_latency,\n COUNT_UPDATE AS rows_updated,\n format_pico_time(SUM_TIMER_UPDATE) AS update_latency,\n COUNT_DELETE AS rows_deleted,\n format_pico_time(SUM_TIMER_INSERT) AS delete_latency\n FROM performance_schema.table_io_waits_summary_by_index_usage\n WHERE index_name IS NOT NULL\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH`) AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE`) AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT`) AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/schema_object_overview.frm b/db/sys/schema_object_overview.frm new file mode 100755 index 0000000..4c37256 --- /dev/null +++ b/db/sys/schema_object_overview.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `information_schema`.`routines`.`ROUTINE_SCHEMA` AS `db`,`information_schema`.`routines`.`ROUTINE_TYPE` AS `object_type`,count(0) AS `count` from `information_schema`.`routines` group by `information_schema`.`routines`.`ROUTINE_SCHEMA`,`information_schema`.`routines`.`ROUTINE_TYPE` union select `information_schema`.`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,count(0) AS `COUNT(*)` from `information_schema`.`tables` group by `information_schema`.`tables`.`TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` union select `information_schema`.`statistics`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,concat(\'INDEX (\',`information_schema`.`statistics`.`INDEX_TYPE`,\')\') AS `CONCAT(\'INDEX (\', INDEX_TYPE, \')\')`,count(0) AS `COUNT(*)` from `information_schema`.`statistics` group by `information_schema`.`statistics`.`TABLE_SCHEMA`,`information_schema`.`statistics`.`INDEX_TYPE` union select `information_schema`.`triggers`.`TRIGGER_SCHEMA` AS `TRIGGER_SCHEMA`,\'TRIGGER\' AS `TRIGGER`,count(0) AS `COUNT(*)` from `information_schema`.`triggers` group by `information_schema`.`triggers`.`TRIGGER_SCHEMA` union select `information_schema`.`events`.`EVENT_SCHEMA` AS `EVENT_SCHEMA`,\'EVENT\' AS `EVENT`,count(0) AS `COUNT(*)` from `information_schema`.`events` group by `information_schema`.`events`.`EVENT_SCHEMA` order by `db`,`object_type` +md5=be1e4ce9f5bcd017616670d43bbce5ae +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139546530 +create-version=2 +source=SELECT ROUTINE_SCHEMA AS db, ROUTINE_TYPE AS object_type, COUNT(*) AS count FROM information_schema.routines GROUP BY ROUTINE_SCHEMA, ROUTINE_TYPE\n UNION\nSELECT TABLE_SCHEMA, TABLE_TYPE, COUNT(*) FROM information_schema.tables GROUP BY TABLE_SCHEMA, TABLE_TYPE\n UNION\nSELECT TABLE_SCHEMA, CONCAT(\'INDEX (\', INDEX_TYPE, \')\'), COUNT(*) FROM information_schema.statistics GROUP BY TABLE_SCHEMA, INDEX_TYPE\n UNION\nSELECT TRIGGER_SCHEMA, \'TRIGGER\', COUNT(*) FROM information_schema.triggers GROUP BY TRIGGER_SCHEMA\n UNION\nSELECT EVENT_SCHEMA, \'EVENT\', COUNT(*) FROM information_schema.events GROUP BY EVENT_SCHEMA\nORDER BY DB, OBJECT_TYPE; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `information_schema`.`routines`.`ROUTINE_SCHEMA` AS `db`,`information_schema`.`routines`.`ROUTINE_TYPE` AS `object_type`,count(0) AS `count` from `information_schema`.`routines` group by `information_schema`.`routines`.`ROUTINE_SCHEMA`,`information_schema`.`routines`.`ROUTINE_TYPE` union select `information_schema`.`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,count(0) AS `COUNT(*)` from `information_schema`.`tables` group by `information_schema`.`tables`.`TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_TYPE` union select `information_schema`.`statistics`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,concat(\'INDEX (\',`information_schema`.`statistics`.`INDEX_TYPE`,\')\') AS `CONCAT(\'INDEX (\', INDEX_TYPE, \')\')`,count(0) AS `COUNT(*)` from `information_schema`.`statistics` group by `information_schema`.`statistics`.`TABLE_SCHEMA`,`information_schema`.`statistics`.`INDEX_TYPE` union select `information_schema`.`triggers`.`TRIGGER_SCHEMA` AS `TRIGGER_SCHEMA`,\'TRIGGER\' AS `TRIGGER`,count(0) AS `COUNT(*)` from `information_schema`.`triggers` group by `information_schema`.`triggers`.`TRIGGER_SCHEMA` union select `information_schema`.`events`.`EVENT_SCHEMA` AS `EVENT_SCHEMA`,\'EVENT\' AS `EVENT`,count(0) AS `COUNT(*)` from `information_schema`.`events` group by `information_schema`.`events`.`EVENT_SCHEMA` order by `db`,`object_type` +mariadb-version=110502 diff --git a/db/sys/schema_redundant_indexes.frm b/db/sys/schema_redundant_indexes.frm new file mode 100755 index 0000000..10499e0 --- /dev/null +++ b/db/sys/schema_redundant_indexes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `redundant_keys`.`table_schema` AS `table_schema`,`redundant_keys`.`table_name` AS `table_name`,`redundant_keys`.`index_name` AS `redundant_index_name`,`redundant_keys`.`index_columns` AS `redundant_index_columns`,`redundant_keys`.`non_unique` AS `redundant_index_non_unique`,`dominant_keys`.`index_name` AS `dominant_index_name`,`dominant_keys`.`index_columns` AS `dominant_index_columns`,`dominant_keys`.`non_unique` AS `dominant_index_non_unique`,if(`redundant_keys`.`subpart_exists` <> 0 or `dominant_keys`.`subpart_exists` <> 0,1,0) AS `subpart_exists`,concat(\'ALTER TABLE `\',`redundant_keys`.`table_schema`,\'`.`\',`redundant_keys`.`table_name`,\'` DROP INDEX `\',`redundant_keys`.`index_name`,\'`\') AS `sql_drop_index` from (`sys`.`x$schema_flattened_keys` `redundant_keys` join `sys`.`x$schema_flattened_keys` `dominant_keys` on(`redundant_keys`.`table_schema` = `dominant_keys`.`table_schema` and `redundant_keys`.`table_name` = `dominant_keys`.`table_name`)) where `redundant_keys`.`index_name` <> `dominant_keys`.`index_name` and (`redundant_keys`.`index_columns` = `dominant_keys`.`index_columns` and (`redundant_keys`.`non_unique` > `dominant_keys`.`non_unique` or `redundant_keys`.`non_unique` = `dominant_keys`.`non_unique` and if(`redundant_keys`.`index_name` = \'PRIMARY\',\'\',`redundant_keys`.`index_name`) > if(`dominant_keys`.`index_name` = \'PRIMARY\',\'\',`dominant_keys`.`index_name`)) or locate(concat(`redundant_keys`.`index_columns`,\',\'),`dominant_keys`.`index_columns`) = 1 and `redundant_keys`.`non_unique` = 1 or locate(concat(`dominant_keys`.`index_columns`,\',\'),`redundant_keys`.`index_columns`) = 1 and `dominant_keys`.`non_unique` = 0) +md5=b7dc42e5df448cf4a08d3059e8ecf40f +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139567299 +create-version=2 +source=SELECT\n redundant_keys.table_schema,\n redundant_keys.table_name,\n redundant_keys.index_name AS redundant_index_name,\n redundant_keys.index_columns AS redundant_index_columns,\n redundant_keys.non_unique AS redundant_index_non_unique,\n dominant_keys.index_name AS dominant_index_name,\n dominant_keys.index_columns AS dominant_index_columns,\n dominant_keys.non_unique AS dominant_index_non_unique,\n IF(redundant_keys.subpart_exists OR dominant_keys.subpart_exists, 1 ,0) AS subpart_exists,\n CONCAT(\n \'ALTER TABLE `\', redundant_keys.table_schema, \'`.`\', redundant_keys.table_name, \'` DROP INDEX `\', redundant_keys.index_name, \'`\'\n ) AS sql_drop_index\n FROM\n x$schema_flattened_keys AS redundant_keys\n INNER JOIN x$schema_flattened_keys AS dominant_keys\n USING (TABLE_SCHEMA, TABLE_NAME)\n WHERE\n redundant_keys.index_name != dominant_keys.index_name\n AND (\n (\n /* Identical columns */\n (redundant_keys.index_columns = dominant_keys.index_columns)\n AND (\n (redundant_keys.non_unique > dominant_keys.non_unique)\n OR (redundant_keys.non_unique = dominant_keys.non_unique\n AND IF(redundant_keys.index_name=\'PRIMARY\', \'\', redundant_keys.index_name) > IF(dominant_keys.index_name=\'PRIMARY\', \'\', dominant_keys.index_name)\n )\n )\n )\n OR\n (\n /* Non-unique prefix columns */\n LOCATE(CONCAT(redundant_keys.index_columns, \',\'), dominant_keys.index_columns) = 1\n AND redundant_keys.non_unique = 1\n )\n OR\n (\n /* Unique prefix columns */\n LOCATE(CONCAT(dominant_keys.index_columns, \',\'), redundant_keys.index_columns) = 1\n AND dominant_keys.non_unique = 0\n )\n ); +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `redundant_keys`.`table_schema` AS `table_schema`,`redundant_keys`.`table_name` AS `table_name`,`redundant_keys`.`index_name` AS `redundant_index_name`,`redundant_keys`.`index_columns` AS `redundant_index_columns`,`redundant_keys`.`non_unique` AS `redundant_index_non_unique`,`dominant_keys`.`index_name` AS `dominant_index_name`,`dominant_keys`.`index_columns` AS `dominant_index_columns`,`dominant_keys`.`non_unique` AS `dominant_index_non_unique`,if(`redundant_keys`.`subpart_exists` <> 0 or `dominant_keys`.`subpart_exists` <> 0,1,0) AS `subpart_exists`,concat(\'ALTER TABLE `\',`redundant_keys`.`table_schema`,\'`.`\',`redundant_keys`.`table_name`,\'` DROP INDEX `\',`redundant_keys`.`index_name`,\'`\') AS `sql_drop_index` from (`sys`.`x$schema_flattened_keys` `redundant_keys` join `sys`.`x$schema_flattened_keys` `dominant_keys` on(`redundant_keys`.`table_schema` = `dominant_keys`.`table_schema` and `redundant_keys`.`table_name` = `dominant_keys`.`table_name`)) where `redundant_keys`.`index_name` <> `dominant_keys`.`index_name` and (`redundant_keys`.`index_columns` = `dominant_keys`.`index_columns` and (`redundant_keys`.`non_unique` > `dominant_keys`.`non_unique` or `redundant_keys`.`non_unique` = `dominant_keys`.`non_unique` and if(`redundant_keys`.`index_name` = \'PRIMARY\',\'\',`redundant_keys`.`index_name`) > if(`dominant_keys`.`index_name` = \'PRIMARY\',\'\',`dominant_keys`.`index_name`)) or locate(concat(`redundant_keys`.`index_columns`,\',\'),`dominant_keys`.`index_columns`) = 1 and `redundant_keys`.`non_unique` = 1 or locate(concat(`dominant_keys`.`index_columns`,\',\'),`redundant_keys`.`index_columns`) = 1 and `dominant_keys`.`non_unique` = 0) +mariadb-version=110502 diff --git a/db/sys/schema_table_lock_waits.frm b/db/sys/schema_table_lock_waits.frm new file mode 100755 index 0000000..3355c35 --- /dev/null +++ b/db/sys/schema_table_lock_waits.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`sys`.`format_statement`(`pt`.`PROCESSLIST_INFO`) AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat(\'KILL QUERY \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat(\'KILL \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE` and `g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA` and `g`.`OBJECT_NAME` = `p`.`OBJECT_NAME` and `g`.`LOCK_STATUS` = \'GRANTED\' and `p`.`LOCK_STATUS` = \'PENDING\')) join `performance_schema`.`threads` `gt` on(`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`)) join `performance_schema`.`threads` `pt` on(`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `gs` on(`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `ps` on(`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`)) where `g`.`OBJECT_TYPE` = \'TABLE\' +md5=0e529ab6c702966e113a44dea76f5a90 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139804782 +create-version=2 +source=SELECT g.object_schema AS object_schema,\n g.object_name AS object_name,\n pt.thread_id AS waiting_thread_id,\n pt.processlist_id AS waiting_pid,\n sys.ps_thread_account(p.owner_thread_id) AS waiting_account,\n p.lock_type AS waiting_lock_type,\n p.lock_duration AS waiting_lock_duration,\n sys.format_statement(pt.processlist_info) AS waiting_query,\n pt.processlist_time AS waiting_query_secs,\n ps.rows_affected AS waiting_query_rows_affected,\n ps.rows_examined AS waiting_query_rows_examined,\n gt.thread_id AS blocking_thread_id,\n gt.processlist_id AS blocking_pid,\n sys.ps_thread_account(g.owner_thread_id) AS blocking_account,\n g.lock_type AS blocking_lock_type,\n g.lock_duration AS blocking_lock_duration,\n CONCAT(\'KILL QUERY \', gt.processlist_id) AS sql_kill_blocking_query,\n CONCAT(\'KILL \', gt.processlist_id) AS sql_kill_blocking_connection\n FROM performance_schema.metadata_locks g\n INNER JOIN performance_schema.metadata_locks p\n ON g.object_type = p.object_type\n AND g.object_schema = p.object_schema\n AND g.object_name = p.object_name\n AND g.lock_status = \'GRANTED\'\n AND p.lock_status = \'PENDING\'\n INNER JOIN performance_schema.threads gt ON g.owner_thread_id = gt.thread_id\n INNER JOIN performance_schema.threads pt ON p.owner_thread_id = pt.thread_id\n LEFT JOIN performance_schema.events_statements_current gs ON g.owner_thread_id = gs.thread_id\n LEFT JOIN performance_schema.events_statements_current ps ON p.owner_thread_id = ps.thread_id\n WHERE g.object_type = \'TABLE\'; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`sys`.`format_statement`(`pt`.`PROCESSLIST_INFO`) AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat(\'KILL QUERY \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat(\'KILL \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE` and `g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA` and `g`.`OBJECT_NAME` = `p`.`OBJECT_NAME` and `g`.`LOCK_STATUS` = \'GRANTED\' and `p`.`LOCK_STATUS` = \'PENDING\')) join `performance_schema`.`threads` `gt` on(`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`)) join `performance_schema`.`threads` `pt` on(`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `gs` on(`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `ps` on(`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`)) where `g`.`OBJECT_TYPE` = \'TABLE\' +mariadb-version=110502 diff --git a/db/sys/schema_table_statistics.frm b/db/sys/schema_table_statistics.frm new file mode 100755 index 0000000..e5a8a48 --- /dev/null +++ b/db/sys/schema_table_statistics.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,format_pico_time(`pst`.`SUM_TIMER_WAIT`) AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,format_pico_time(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,format_pico_time(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,format_pico_time(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,format_pico_time(`fsbi`.`sum_timer_misc`) AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +md5=74a7b27f66a13611050e4ea8186510b4 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139755151 +create-version=2 +source=SELECT pst.object_schema AS table_schema,\n pst.object_name AS table_name,\n format_pico_time(pst.sum_timer_wait) AS total_latency,\n pst.count_fetch AS rows_fetched,\n format_pico_time(pst.sum_timer_fetch) AS fetch_latency,\n pst.count_insert AS rows_inserted,\n format_pico_time(pst.sum_timer_insert) AS insert_latency,\n pst.count_update AS rows_updated,\n format_pico_time(pst.sum_timer_update) AS update_latency,\n pst.count_delete AS rows_deleted,\n format_pico_time(pst.sum_timer_delete) AS delete_latency,\n fsbi.count_read AS io_read_requests,\n sys.format_bytes(fsbi.sum_number_of_bytes_read) AS io_read,\n format_pico_time(fsbi.sum_timer_read) AS io_read_latency,\n fsbi.count_write AS io_write_requests,\n sys.format_bytes(fsbi.sum_number_of_bytes_write) AS io_write,\n format_pico_time(fsbi.sum_timer_write) AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n format_pico_time(fsbi.sum_timer_misc) AS io_misc_latency\n FROM performance_schema.table_io_waits_summary_by_table AS pst\n LEFT JOIN x$ps_schema_table_statistics_io AS fsbi\n ON pst.object_schema = fsbi.table_schema\n AND pst.object_name = fsbi.table_name\n ORDER BY pst.sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,format_pico_time(`pst`.`SUM_TIMER_WAIT`) AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,format_pico_time(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,format_pico_time(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,format_pico_time(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,format_pico_time(`fsbi`.`sum_timer_misc`) AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/schema_table_statistics_with_buffer.frm b/db/sys/schema_table_statistics_with_buffer.frm new file mode 100755 index 0000000..be3979d --- /dev/null +++ b/db/sys/schema_table_statistics_with_buffer.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,format_pico_time(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,format_pico_time(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,format_pico_time(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,format_pico_time(`fsbi`.`sum_timer_misc`) AS `io_misc_latency`,`sys`.`format_bytes`(`ibp`.`allocated`) AS `innodb_buffer_allocated`,`sys`.`format_bytes`(`ibp`.`data`) AS `innodb_buffer_data`,`sys`.`format_bytes`(`ibp`.`allocated` - `ibp`.`data`) AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema` and `pst`.`OBJECT_NAME` = `ibp`.`object_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +md5=babe17622733f781733c5d9063af3aaf +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139770794 +create-version=2 +source=SELECT pst.object_schema AS table_schema,\n pst.object_name AS table_name,\n pst.count_fetch AS rows_fetched,\n format_pico_time(pst.sum_timer_fetch) AS fetch_latency,\n pst.count_insert AS rows_inserted,\n format_pico_time(pst.sum_timer_insert) AS insert_latency,\n pst.count_update AS rows_updated,\n format_pico_time(pst.sum_timer_update) AS update_latency,\n pst.count_delete AS rows_deleted,\n format_pico_time(pst.sum_timer_delete) AS delete_latency,\n fsbi.count_read AS io_read_requests,\n sys.format_bytes(fsbi.sum_number_of_bytes_read) AS io_read,\n format_pico_time(fsbi.sum_timer_read) AS io_read_latency,\n fsbi.count_write AS io_write_requests,\n sys.format_bytes(fsbi.sum_number_of_bytes_write) AS io_write,\n format_pico_time(fsbi.sum_timer_write) AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n format_pico_time(fsbi.sum_timer_misc) AS io_misc_latency,\n sys.format_bytes(ibp.allocated) AS innodb_buffer_allocated,\n sys.format_bytes(ibp.data) AS innodb_buffer_data,\n sys.format_bytes(ibp.allocated - ibp.data) AS innodb_buffer_free,\n ibp.pages AS innodb_buffer_pages,\n ibp.pages_hashed AS innodb_buffer_pages_hashed,\n ibp.pages_old AS innodb_buffer_pages_old,\n ibp.rows_cached AS innodb_buffer_rows_cached\n FROM performance_schema.table_io_waits_summary_by_table AS pst\n LEFT JOIN x$ps_schema_table_statistics_io AS fsbi\n ON pst.object_schema = fsbi.table_schema\n AND pst.object_name = fsbi.table_name\n LEFT JOIN sys.x$innodb_buffer_stats_by_table AS ibp\n ON pst.object_schema = ibp.object_schema\n AND pst.object_name = ibp.object_name\n ORDER BY pst.sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,format_pico_time(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,format_pico_time(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,format_pico_time(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,format_pico_time(`pst`.`SUM_TIMER_DELETE`) AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`) AS `io_read`,format_pico_time(`fsbi`.`sum_timer_read`) AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`,format_pico_time(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,format_pico_time(`fsbi`.`sum_timer_misc`) AS `io_misc_latency`,`sys`.`format_bytes`(`ibp`.`allocated`) AS `innodb_buffer_allocated`,`sys`.`format_bytes`(`ibp`.`data`) AS `innodb_buffer_data`,`sys`.`format_bytes`(`ibp`.`allocated` - `ibp`.`data`) AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema` and `pst`.`OBJECT_NAME` = `ibp`.`object_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/schema_tables_with_full_table_scans.frm b/db/sys/schema_tables_with_full_table_scans.frm new file mode 100755 index 0000000..aea3026 --- /dev/null +++ b/db/sys/schema_tables_with_full_table_scans.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT`) AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0 order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc +md5=dcd97456a8df9123b94972666be066a5 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139785616 +create-version=2 +source=SELECT object_schema,\n object_name,\n count_read AS rows_full_scanned,\n format_pico_time(sum_timer_wait) AS latency\n FROM performance_schema.table_io_waits_summary_by_index_usage\n WHERE index_name IS NULL\n AND count_read > 0\n ORDER BY count_read DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,format_pico_time(`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT`) AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0 order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc +mariadb-version=110502 diff --git a/db/sys/schema_unused_indexes.frm b/db/sys/schema_unused_indexes.frm new file mode 100755 index 0000000..ad80e33 --- /dev/null +++ b/db/sys/schema_unused_indexes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_STAR` = 0 and `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` <> \'mysql\' and `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` <> \'PRIMARY\' order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` +md5=fcec883d9422ee0089c8d60c48eb8238 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139798163 +create-version=2 +source=SELECT object_schema,\n object_name,\n index_name\n FROM performance_schema.table_io_waits_summary_by_index_usage\n WHERE index_name IS NOT NULL\n AND count_star = 0\n AND object_schema != \'mysql\'\n AND index_name != \'PRIMARY\'\n ORDER BY object_schema, object_name; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_STAR` = 0 and `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` <> \'mysql\' and `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` <> \'PRIMARY\' order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` +mariadb-version=110502 diff --git a/db/sys/session.frm b/db/sys/session.frm new file mode 100755 index 0000000..7229ee2 --- /dev/null +++ b/db/sys/session.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `processlist`.`thd_id` AS `thd_id`,`processlist`.`conn_id` AS `conn_id`,`processlist`.`user` AS `user`,`processlist`.`db` AS `db`,`processlist`.`command` AS `command`,`processlist`.`state` AS `state`,`processlist`.`time` AS `time`,`processlist`.`current_statement` AS `current_statement`,`processlist`.`statement_latency` AS `statement_latency`,`processlist`.`progress` AS `progress`,`processlist`.`lock_latency` AS `lock_latency`,`processlist`.`rows_examined` AS `rows_examined`,`processlist`.`rows_sent` AS `rows_sent`,`processlist`.`rows_affected` AS `rows_affected`,`processlist`.`tmp_tables` AS `tmp_tables`,`processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`processlist`.`full_scan` AS `full_scan`,`processlist`.`last_statement` AS `last_statement`,`processlist`.`last_statement_latency` AS `last_statement_latency`,`processlist`.`current_memory` AS `current_memory`,`processlist`.`last_wait` AS `last_wait`,`processlist`.`last_wait_latency` AS `last_wait_latency`,`processlist`.`source` AS `source`,`processlist`.`trx_latency` AS `trx_latency`,`processlist`.`trx_state` AS `trx_state`,`processlist`.`trx_autocommit` AS `trx_autocommit`,`processlist`.`pid` AS `pid`,`processlist`.`program_name` AS `program_name` from `sys`.`processlist` where `processlist`.`conn_id` is not null and `processlist`.`command` <> \'Daemon\' +md5=5d945dd589c16b1108e948bdcabafcf3 +updatable=0 +algorithm=0 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140193017 +create-version=2 +source=SELECT * FROM sys.processlist\nWHERE conn_id IS NOT NULL AND command != \'Daemon\'; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `processlist`.`thd_id` AS `thd_id`,`processlist`.`conn_id` AS `conn_id`,`processlist`.`user` AS `user`,`processlist`.`db` AS `db`,`processlist`.`command` AS `command`,`processlist`.`state` AS `state`,`processlist`.`time` AS `time`,`processlist`.`current_statement` AS `current_statement`,`processlist`.`statement_latency` AS `statement_latency`,`processlist`.`progress` AS `progress`,`processlist`.`lock_latency` AS `lock_latency`,`processlist`.`rows_examined` AS `rows_examined`,`processlist`.`rows_sent` AS `rows_sent`,`processlist`.`rows_affected` AS `rows_affected`,`processlist`.`tmp_tables` AS `tmp_tables`,`processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`processlist`.`full_scan` AS `full_scan`,`processlist`.`last_statement` AS `last_statement`,`processlist`.`last_statement_latency` AS `last_statement_latency`,`processlist`.`current_memory` AS `current_memory`,`processlist`.`last_wait` AS `last_wait`,`processlist`.`last_wait_latency` AS `last_wait_latency`,`processlist`.`source` AS `source`,`processlist`.`trx_latency` AS `trx_latency`,`processlist`.`trx_state` AS `trx_state`,`processlist`.`trx_autocommit` AS `trx_autocommit`,`processlist`.`pid` AS `pid`,`processlist`.`program_name` AS `program_name` from `sys`.`processlist` where `processlist`.`conn_id` is not null and `processlist`.`command` <> \'Daemon\' +mariadb-version=110502 diff --git a/db/sys/session_ssl_status.frm b/db/sys/session_ssl_status.frm new file mode 100755 index 0000000..d7e184a --- /dev/null +++ b/db/sys/session_ssl_status.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sslver`.`THREAD_ID` AS `thread_id`,`sslver`.`VARIABLE_VALUE` AS `ssl_version`,`sslcip`.`VARIABLE_VALUE` AS `ssl_cipher`,`sslreuse`.`VARIABLE_VALUE` AS `ssl_sessions_reused` from ((`performance_schema`.`status_by_thread` `sslver` left join `performance_schema`.`status_by_thread` `sslcip` on(`sslcip`.`THREAD_ID` = `sslver`.`THREAD_ID` and `sslcip`.`VARIABLE_NAME` = \'Ssl_cipher\')) left join `performance_schema`.`status_by_thread` `sslreuse` on(`sslreuse`.`THREAD_ID` = `sslver`.`THREAD_ID` and `sslreuse`.`VARIABLE_NAME` = \'Ssl_sessions_reused\')) where `sslver`.`VARIABLE_NAME` = \'Ssl_version\' +md5=888bde4bd747f7df3ec788d97818af55 +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140207927 +create-version=2 +source=SELECT sslver.thread_id,\n sslver.variable_value ssl_version,\n sslcip.variable_value ssl_cipher,\n sslreuse.variable_value ssl_sessions_reused\n FROM performance_schema.status_by_thread sslver\n LEFT JOIN performance_schema.status_by_thread sslcip\n ON (sslcip.thread_id=sslver.thread_id and sslcip.variable_name=\'Ssl_cipher\')\n LEFT JOIN performance_schema.status_by_thread sslreuse\n ON (sslreuse.thread_id=sslver.thread_id and sslreuse.variable_name=\'Ssl_sessions_reused\')\n WHERE sslver.variable_name=\'Ssl_version\'; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sslver`.`THREAD_ID` AS `thread_id`,`sslver`.`VARIABLE_VALUE` AS `ssl_version`,`sslcip`.`VARIABLE_VALUE` AS `ssl_cipher`,`sslreuse`.`VARIABLE_VALUE` AS `ssl_sessions_reused` from ((`performance_schema`.`status_by_thread` `sslver` left join `performance_schema`.`status_by_thread` `sslcip` on(`sslcip`.`THREAD_ID` = `sslver`.`THREAD_ID` and `sslcip`.`VARIABLE_NAME` = \'Ssl_cipher\')) left join `performance_schema`.`status_by_thread` `sslreuse` on(`sslreuse`.`THREAD_ID` = `sslver`.`THREAD_ID` and `sslreuse`.`VARIABLE_NAME` = \'Ssl_sessions_reused\')) where `sslver`.`VARIABLE_NAME` = \'Ssl_version\' +mariadb-version=110502 diff --git a/db/sys/statement_analysis.frm b/db/sys/statement_analysis.frm new file mode 100755 index 0000000..cdea902 --- /dev/null +++ b/db/sys/statement_analysis.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +md5=e037e136516fae531ffa6ce3d9fc603f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139819119 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME AS db,\n IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, \'*\', \'\') AS full_scan,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS err_count,\n SUM_WARNINGS AS warn_count,\n format_pico_time(SUM_TIMER_WAIT) AS total_latency,\n format_pico_time(MAX_TIMER_WAIT) AS max_latency,\n format_pico_time(AVG_TIMER_WAIT) AS avg_latency,\n format_pico_time(SUM_LOCK_TIME) AS lock_latency,\n SUM_ROWS_SENT AS rows_sent,\n ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg,\n SUM_ROWS_AFFECTED AS rows_affected,\n ROUND(IFNULL(SUM_ROWS_AFFECTED / NULLIF(COUNT_STAR, 0), 0)) AS rows_affected_avg,\n SUM_CREATED_TMP_TABLES AS tmp_tables,\n SUM_CREATED_TMP_DISK_TABLES AS tmp_disk_tables,\n SUM_SORT_ROWS AS rows_sorted,\n SUM_SORT_MERGE_PASSES AS sort_merge_passes,\n DIGEST AS digest,\n FIRST_SEEN AS first_seen,\n LAST_SEEN as last_seen\n FROM performance_schema.events_statements_summary_by_digest\nORDER BY SUM_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/statements_with_errors_or_warnings.frm b/db/sys/statements_with_errors_or_warnings.frm new file mode 100755 index 0000000..5ebe0c1 --- /dev/null +++ b/db/sys/statements_with_errors_or_warnings.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc +md5=0d5bc7a3a6b50253b6b71e214beb1104 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139832259 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS errors,\n IFNULL(SUM_ERRORS / NULLIF(COUNT_STAR, 0), 0) * 100 as error_pct,\n SUM_WARNINGS AS warnings,\n IFNULL(SUM_WARNINGS / NULLIF(COUNT_STAR, 0), 0) * 100 as warning_pct,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_ERRORS > 0\n OR SUM_WARNINGS > 0\nORDER BY SUM_ERRORS DESC, SUM_WARNINGS DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc +mariadb-version=110502 diff --git a/db/sys/statements_with_full_table_scans.frm b/db/sys/statements_with_full_table_scans.frm new file mode 100755 index 0000000..204a59b --- /dev/null +++ b/db/sys/statements_with_full_table_scans.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_sent_avg`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) and `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` not like \'SHOW%\' order by round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) desc,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) desc +md5=c15d5fb47b5ab4f0a5b4d8c50379a100 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139846996 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n format_pico_time(SUM_TIMER_WAIT) AS total_latency,\n SUM_NO_INDEX_USED AS no_index_used_count,\n SUM_NO_GOOD_INDEX_USED AS no_good_index_used_count,\n ROUND(IFNULL(SUM_NO_INDEX_USED / NULLIF(COUNT_STAR, 0), 0) * 100) AS no_index_used_pct,\n SUM_ROWS_SENT AS rows_sent,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(SUM_ROWS_SENT/COUNT_STAR) AS rows_sent_avg,\n ROUND(SUM_ROWS_EXAMINED/COUNT_STAR) AS rows_examined_avg,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE (SUM_NO_INDEX_USED > 0\n OR SUM_NO_GOOD_INDEX_USED > 0)\n AND DIGEST_TEXT NOT LIKE \'SHOW%\'\n ORDER BY no_index_used_pct DESC, total_latency DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_sent_avg`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) and `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` not like \'SHOW%\' order by round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) desc,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/statements_with_runtimes_in_95th_percentile.frm b/db/sys/statements_with_runtimes_in_95th_percentile.frm new file mode 100755 index 0000000..92edeaf --- /dev/null +++ b/db/sys/statements_with_runtimes_in_95th_percentile.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`stmts`.`DIGEST_TEXT`) AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0 or `stmts`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,format_pico_time(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`stmts`.`AVG_TIMER_WAIT`) AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on(round(`stmts`.`AVG_TIMER_WAIT` / 1000000,0) >= `top_percentile`.`avg_us`)) order by `stmts`.`AVG_TIMER_WAIT` desc +md5=d6f2238ee4994e7c6edfd0d09d4d5e1d +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139875382 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, \'*\', \'\') AS full_scan,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS err_count,\n SUM_WARNINGS AS warn_count,\n format_pico_time(SUM_TIMER_WAIT) AS total_latency,\n format_pico_time(MAX_TIMER_WAIT) AS max_latency,\n format_pico_time(AVG_TIMER_WAIT) AS avg_latency,\n SUM_ROWS_SENT AS rows_sent,\n ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg,\n FIRST_SEEN AS first_seen,\n LAST_SEEN AS last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest stmts\n JOIN sys.x$ps_digest_95th_percentile_by_avg_us AS top_percentile\n ON ROUND(stmts.avg_timer_wait/1000000) >= top_percentile.avg_us\n ORDER BY AVG_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`stmts`.`DIGEST_TEXT`) AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0 or `stmts`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,format_pico_time(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`stmts`.`AVG_TIMER_WAIT`) AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on(round(`stmts`.`AVG_TIMER_WAIT` / 1000000,0) >= `top_percentile`.`avg_us`)) order by `stmts`.`AVG_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/statements_with_sorting.frm b/db/sys/statements_with_sorting.frm new file mode 100755 index 0000000..247d2df --- /dev/null +++ b/db/sys/statements_with_sorting.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +md5=6c3395875de3fc576ff6c0e12479986e +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139891703 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME db,\n COUNT_STAR AS exec_count,\n format_pico_time(SUM_TIMER_WAIT) AS total_latency,\n SUM_SORT_MERGE_PASSES AS sort_merge_passes,\n ROUND(IFNULL(SUM_SORT_MERGE_PASSES / NULLIF(COUNT_STAR, 0), 0)) AS avg_sort_merges,\n SUM_SORT_SCAN AS sorts_using_scans,\n SUM_SORT_RANGE AS sort_using_range,\n SUM_SORT_ROWS AS rows_sorted,\n ROUND(IFNULL(SUM_SORT_ROWS / NULLIF(COUNT_STAR, 0), 0)) AS avg_rows_sorted,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_SORT_ROWS > 0\n ORDER BY SUM_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/statements_with_temp_tables.frm b/db/sys/statements_with_temp_tables.frm new file mode 100755 index 0000000..16904db --- /dev/null +++ b/db/sys/statements_with_temp_tables.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_tmp_tables_per_query`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0),0) * 100,0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc +md5=44565b2be26dc160193a2c4dc7f37af0 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139907658 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n format_pico_time(SUM_TIMER_WAIT) as total_latency,\n SUM_CREATED_TMP_TABLES AS memory_tmp_tables,\n SUM_CREATED_TMP_DISK_TABLES AS disk_tmp_tables,\n ROUND(IFNULL(SUM_CREATED_TMP_TABLES / NULLIF(COUNT_STAR, 0), 0)) AS avg_tmp_tables_per_query,\n ROUND(IFNULL(SUM_CREATED_TMP_DISK_TABLES / NULLIF(SUM_CREATED_TMP_TABLES, 0), 0) * 100) AS tmp_tables_to_disk_pct,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_CREATED_TMP_TABLES > 0\nORDER BY SUM_CREATED_TMP_DISK_TABLES DESC, SUM_CREATED_TMP_TABLES DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `sys`.`format_statement`(`performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT`) AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,format_pico_time(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_tmp_tables_per_query`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0),0) * 100,0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc +mariadb-version=110502 diff --git a/db/sys/sys_config.MAD b/db/sys/sys_config.MAD new file mode 100755 index 0000000..93810e1 Binary files /dev/null and b/db/sys/sys_config.MAD differ diff --git a/db/sys/sys_config.MAI b/db/sys/sys_config.MAI new file mode 100755 index 0000000..c94792a Binary files /dev/null and b/db/sys/sys_config.MAI differ diff --git a/db/sys/sys_config.frm b/db/sys/sys_config.frm new file mode 100755 index 0000000..918fc0a Binary files /dev/null and b/db/sys/sys_config.frm differ diff --git a/db/sys/user_summary.frm b/db/sys/user_summary.frm new file mode 100755 index 0000000..020aec9 --- /dev/null +++ b/db/sys/user_summary.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,format_pico_time(sum(`stmt`.`total_latency`)) AS `statement_latency`,format_pico_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`,format_pico_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`.`HOST`) AS `unique_hosts`,`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` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`)) left join `sys`.`x$user_summary_by_file_io` `io` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `io`.`user`)) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `mem`.`user`)) group by if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc +md5=8257b4d5fe59ed91cc5df1de9bac74a7 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139996486 +create-version=2 +source=SELECT IF(accounts.user IS NULL, \'background\', accounts.user) AS user,\n SUM(stmt.total) AS statements,\n format_pico_time(SUM(stmt.total_latency)) AS statement_latency,\n format_pico_time(IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0)) AS statement_avg_latency,\n SUM(stmt.full_scans) AS table_scans,\n SUM(io.ios) AS file_ios,\n format_pico_time(SUM(io.io_latency)) AS file_io_latency,\n SUM(accounts.current_connections) AS current_connections,\n SUM(accounts.total_connections) AS total_connections,\n COUNT(DISTINCT host) AS unique_hosts,\n sys.format_bytes(SUM(mem.current_allocated)) AS current_memory,\n sys.format_bytes(SUM(mem.total_allocated)) AS total_memory_allocated\n FROM performance_schema.accounts\n LEFT JOIN sys.x$user_summary_by_statement_latency AS stmt ON IF(accounts.user IS NULL, \'background\', accounts.user) = stmt.user\n LEFT JOIN sys.x$user_summary_by_file_io AS io ON IF(accounts.user IS NULL, \'background\', accounts.user) = io.user\n LEFT JOIN sys.x$memory_by_user_by_current_bytes mem ON IF(accounts.user IS NULL, \'background\', accounts.user) = mem.user\n GROUP BY IF(accounts.user IS NULL, \'background\', accounts.user)\n ORDER BY SUM(stmt.total_latency) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,format_pico_time(sum(`stmt`.`total_latency`)) AS `statement_latency`,format_pico_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`,format_pico_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`.`HOST`) AS `unique_hosts`,`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` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`)) left join `sys`.`x$user_summary_by_file_io` `io` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `io`.`user`)) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `mem`.`user`)) group by if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc +mariadb-version=110502 diff --git a/db/sys/user_summary_by_file_io.frm b/db/sys/user_summary_by_file_io.frm new file mode 100755 index 0000000..1510251 --- /dev/null +++ b/db/sys/user_summary_by_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,format_pico_time(sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=10c9c4273d29bed921d4dd363defd2fe +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139936084 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS ios,\n format_pico_time(SUM(sum_timer_wait)) AS io_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,format_pico_time(sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/user_summary_by_file_io_type.frm b/db/sys/user_summary_by_file_io_type.frm new file mode 100755 index 0000000..78dcff1 --- /dev/null +++ b/db/sys/user_summary_by_file_io_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=8967c13925c1911b58ec145ebcce896c +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139922702 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS latency,\n format_pico_time(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name LIKE \'wait/io/file%\'\n AND count_star > 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/user_summary_by_stages.frm b/db/sys/user_summary_by_stages.frm new file mode 100755 index 0000000..d0e5ebe --- /dev/null +++ b/db/sys/user_summary_by_stages.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where `performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=5bdb3d6134c2a3f593fd6d0222ac8e65 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139978574 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency\n FROM performance_schema.events_stages_summary_by_user_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where `performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/user_summary_by_statement_latency.frm b/db/sys/user_summary_by_statement_latency.frm new file mode 100755 index 0000000..a55e9d0 --- /dev/null +++ b/db/sys/user_summary_by_statement_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=ff951e5566ec0a801b10a1d72f5dd0bf +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139964776 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS total,\n format_pico_time(SUM(sum_timer_wait)) AS total_latency,\n format_pico_time(SUM(max_timer_wait)) AS max_latency,\n format_pico_time(SUM(sum_lock_time)) AS lock_latency,\n SUM(sum_rows_sent) AS rows_sent,\n SUM(sum_rows_examined) AS rows_examined,\n SUM(sum_rows_affected) AS rows_affected,\n SUM(sum_no_index_used) + SUM(sum_no_good_index_used) AS full_scans\n FROM performance_schema.events_statements_summary_by_user_by_event_name\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,format_pico_time(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/user_summary_by_statement_type.frm b/db/sys/user_summary_by_statement_type.frm new file mode 100755 index 0000000..594b726 --- /dev/null +++ b/db/sys/user_summary_by_statement_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED` AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=0a9fac42f7b7633e6717f26af91d6b06 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139950786 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUBSTRING_INDEX(event_name, \'/\', -1) AS statement,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(max_timer_wait) AS max_latency,\n format_pico_time(sum_lock_time) AS lock_latency,\n sum_rows_sent AS rows_sent,\n sum_rows_examined AS rows_examined,\n sum_rows_affected AS rows_affected,\n sum_no_index_used + sum_no_good_index_used AS full_scans\n FROM performance_schema.events_statements_summary_by_user_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,format_pico_time(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED` AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/version.frm b/db/sys/version.frm new file mode 100755 index 0000000..9baac30 --- /dev/null +++ b/db/sys/version.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select \'1.5.2\' AS `sys_version`,version() AS `mysql_version` +md5=4e2508b71654f19bd9553eeabf2918f2 +updatable=0 +algorithm=0 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139328872 +create-version=2 +source=SELECT \'1.5.2\' AS sys_version,\n version() AS mysql_version; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select \'1.5.2\' AS `sys_version`,version() AS `mysql_version` +mariadb-version=110502 diff --git a/db/sys/wait_classes_global_by_avg_latency.frm b/db/sys/wait_classes_global_by_avg_latency.frm new file mode 100755 index 0000000..fd4e076 --- /dev/null +++ b/db/sys/wait_classes_global_by_avg_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(cast(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) as unsigned)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0)) AS `avg_latency`,format_pico_time(cast(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) as unsigned)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) desc +md5=96242bee6930a9ebab75b6776220c644 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140093852 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n format_pico_time(CAST(SUM(sum_timer_wait) AS UNSIGNED)) AS total_latency,\n format_pico_time(MIN(min_timer_wait)) AS min_latency,\n format_pico_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency,\n format_pico_time(CAST(MAX(max_timer_wait) AS UNSIGNED)) AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE sum_timer_wait > 0\n AND event_name != \'idle\'\n GROUP BY event_class\n ORDER BY IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(cast(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) as unsigned)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0)) AS `avg_latency`,format_pico_time(cast(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) as unsigned)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) desc +mariadb-version=110502 diff --git a/db/sys/wait_classes_global_by_latency.frm b/db/sys/wait_classes_global_by_latency.frm new file mode 100755 index 0000000..1390bc6 --- /dev/null +++ b/db/sys/wait_classes_global_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0)) AS `avg_latency`,format_pico_time(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=4c494df87284af3b937a84ed12339291 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140107876 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n format_pico_time(SUM(sum_timer_wait)) AS total_latency,\n format_pico_time(MIN(min_timer_wait)) min_latency,\n format_pico_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency,\n format_pico_time(MAX(max_timer_wait)) AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE sum_timer_wait > 0\n AND event_name != \'idle\'\n GROUP BY SUBSTRING_INDEX(event_name,\'/\', 3)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,format_pico_time(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,format_pico_time(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,format_pico_time(ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0)) AS `avg_latency`,format_pico_time(max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/waits_by_host_by_latency.frm b/db/sys/waits_by_host_by_latency.frm new file mode 100755 index 0000000..0f1e4aa --- /dev/null +++ b/db/sys/waits_by_host_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_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` <> \'idle\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=d15ee6286e329ddcf149dcb195833962 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140133086 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name AS event,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency,\n format_pico_time(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name != \'idle\'\n AND sum_timer_wait > 0\n ORDER BY host, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_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` <> \'idle\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/waits_by_user_by_latency.frm b/db/sys/waits_by_user_by_latency.frm new file mode 100755 index 0000000..f402db2 --- /dev/null +++ b/db/sys/waits_by_user_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=756ad83e07f144f50c717665485d9461 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140120420 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name AS event,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency,\n format_pico_time(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name != \'idle\'\n AND user IS NOT NULL\n AND sum_timer_wait > 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/waits_global_by_latency.frm b/db/sys/waits_global_by_latency.frm new file mode 100755 index 0000000..d885ddd --- /dev/null +++ b/db/sys/waits_global_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc +md5=653d5fed66fefc91b76a1b2bbc2754b3 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140145676 +create-version=2 +source=SELECT event_name AS event,\n count_star AS total,\n format_pico_time(sum_timer_wait) AS total_latency,\n format_pico_time(avg_timer_wait) AS avg_latency,\n format_pico_time(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE event_name != \'idle\'\n AND sum_timer_wait > 0\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,format_pico_time(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary.frm b/db/sys/x@0024host_summary.frm new file mode 100755 index 0000000..c78ab0f --- /dev/null +++ b/db/sys/x@0024host_summary.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,sum(`stmt`.`total_latency`) / sum(`stmt`.`total`) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,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`,sum(`mem`.`current_allocated`) AS `current_memory`,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(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +md5=67e4bc9e1f0f2c08e58833e2d5538896 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140087241 +create-version=2 +source=SELECT IF(accounts.host IS NULL, \'background\', accounts.host) AS host,\n SUM(stmt.total) AS statements,\n SUM(stmt.total_latency) AS statement_latency,\n SUM(stmt.total_latency) / SUM(stmt.total) AS statement_avg_latency,\n SUM(stmt.full_scans) AS table_scans,\n SUM(io.ios) AS file_ios,\n SUM(io.io_latency) AS file_io_latency,\n SUM(accounts.current_connections) AS current_connections,\n SUM(accounts.total_connections) AS total_connections,\n COUNT(DISTINCT accounts.user) AS unique_users,\n SUM(mem.current_allocated) AS current_memory,\n SUM(mem.total_allocated) AS total_memory_allocated\n FROM performance_schema.accounts\n JOIN sys.x$host_summary_by_statement_latency AS stmt ON accounts.host = stmt.host\n JOIN sys.x$host_summary_by_file_io AS io ON accounts.host = io.host\n JOIN sys.x$memory_by_host_by_current_bytes mem ON accounts.host = mem.host\n GROUP BY IF(accounts.host IS NULL, \'background\', accounts.host); +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,sum(`stmt`.`total_latency`) / sum(`stmt`.`total`) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,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`,sum(`mem`.`current_allocated`) AS `current_memory`,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(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary_by_file_io.frm b/db/sys/x@0024host_summary_by_file_io.frm new file mode 100755 index 0000000..cb0cab5 --- /dev/null +++ b/db/sys/x@0024host_summary_by_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=901c381d3d98dbb46350e5bbae184d88 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140031443 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS ios,\n SUM(sum_timer_wait) AS io_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary_by_file_io_type.frm b/db/sys/x@0024host_summary_by_file_io_type.frm new file mode 100755 index 0000000..4d4ac71 --- /dev/null +++ b/db/sys/x@0024host_summary_by_file_io_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=d62d46509ecc2c266e46ec8a89b866f9 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140018819 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n sum_timer_wait AS total_latency,\n max_timer_wait AS max_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name LIKE \'wait/io/file%\'\n AND count_star > 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`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(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary_by_stages.frm b/db/sys/x@0024host_summary_by_stages.frm new file mode 100755 index 0000000..47d65fc --- /dev/null +++ b/db/sys/x@0024host_summary_by_stages.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`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(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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=fc6f8e38aee0ae855dab711a3ba9f56c +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140071551 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency\n FROM performance_schema.events_stages_summary_by_host_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`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(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary_by_statement_latency.frm b/db/sys/x@0024host_summary_by_statement_latency.frm new file mode 100755 index 0000000..f582751 --- /dev/null +++ b/db/sys/x@0024host_summary_by_statement_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,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(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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=80be376168c9b08aa7c19aaf5ebee747 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140059137 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS total,\n SUM(sum_timer_wait) AS total_latency,\n MAX(max_timer_wait) AS max_latency,\n SUM(sum_lock_time) AS lock_latency,\n SUM(sum_rows_sent) AS rows_sent,\n SUM(sum_rows_examined) AS rows_examined,\n SUM(sum_rows_affected) AS rows_affected,\n SUM(sum_no_index_used) + SUM(sum_no_good_index_used) AS full_scans\n FROM performance_schema.events_statements_summary_by_host_by_event_name\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,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(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/x@0024host_summary_by_statement_type.frm b/db/sys/x@0024host_summary_by_statement_type.frm new file mode 100755 index 0000000..324e7be --- /dev/null +++ b/db/sys/x@0024host_summary_by_statement_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `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` where `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc +md5=f0524c728d74e019a8384c7369a71a51 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140045166 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUBSTRING_INDEX(event_name, \'/\', -1) AS statement,\n count_star AS total,\n sum_timer_wait AS total_latency,\n max_timer_wait AS max_latency,\n sum_lock_time AS lock_latency,\n sum_rows_sent AS rows_sent,\n sum_rows_examined AS rows_examined,\n sum_rows_affected AS rows_affected,\n sum_no_index_used + sum_no_good_index_used AS full_scans\n FROM performance_schema.events_statements_summary_by_host_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY IF(host IS NULL, \'background\', host), sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`) AS `host`,substring_index(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED` + `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` where `performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`events_statements_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024innodb_buffer_stats_by_schema.frm b/db/sys/x@0024innodb_buffer_stats_by_schema.frm new file mode 100755 index 0000000..dc70e80 --- /dev/null +++ b/db/sys/x@0024innodb_buffer_stats_by_schema.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +md5=5520d476400f773f5e963f96dc10e46a +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139509815 +create-version=2 +source=SELECT IF(LOCATE(\'.\', ibp.table_name) = 0, \'InnoDB System\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', 1), \'`\', \'\')) AS object_schema,\n SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) AS allocated,\n SUM(ibp.data_size) AS data,\n COUNT(ibp.page_number) AS pages,\n COUNT(IF(ibp.is_hashed, 1, NULL)) AS pages_hashed,\n COUNT(IF(ibp.is_old, 1, NULL)) AS pages_old,\n ROUND(IFNULL(SUM(ibp.number_records)/NULLIF(COUNT(DISTINCT ibp.index_name), 0), 0)) AS rows_cached\n FROM information_schema.innodb_buffer_page ibp\n WHERE table_name IS NOT NULL\n GROUP BY object_schema\n ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +mariadb-version=110502 diff --git a/db/sys/x@0024innodb_buffer_stats_by_table.frm b/db/sys/x@0024innodb_buffer_stats_by_table.frm new file mode 100755 index 0000000..01f5bc9 --- /dev/null +++ b/db/sys/x@0024innodb_buffer_stats_by_table.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') AS `object_name`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')),replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +md5=db96ddcff1919852c2c98356a6e4cc80 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139523749 +create-version=2 +source=SELECT IF(LOCATE(\'.\', ibp.table_name) = 0, \'InnoDB System\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', 1), \'`\', \'\')) AS object_schema,\n REPLACE(SUBSTRING_INDEX(ibp.table_name, \'.\', -1), \'`\', \'\') AS object_name,\n SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) AS allocated,\n SUM(ibp.data_size) AS data,\n COUNT(ibp.page_number) AS pages,\n COUNT(IF(ibp.is_hashed, 1, NULL)) AS pages_hashed,\n COUNT(IF(ibp.is_old, 1, NULL)) AS pages_old,\n ROUND(IFNULL(SUM(ibp.number_records)/NULLIF(COUNT(DISTINCT ibp.index_name), 0), 0)) AS rows_cached\n FROM information_schema.innodb_buffer_page ibp\n WHERE table_name IS NOT NULL\n GROUP BY object_schema, object_name\n ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') AS `object_name`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\'.\',`ibp`.`TABLE_NAME`) = 0,\'InnoDB System\',replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',1),\'`\',\'\')),replace(substring_index(`ibp`.`TABLE_NAME`,\'.\',-1),\'`\',\'\') order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc +mariadb-version=110502 diff --git a/db/sys/x@0024innodb_lock_waits.frm b/db/sys/x@0024innodb_lock_waits.frm new file mode 100755 index 0000000..3f8cabd --- /dev/null +++ b/db/sys/x@0024innodb_lock_waits.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `r`.`trx_wait_started` AS `wait_started`,timediff(current_timestamp(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,current_timestamp()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(current_timestamp(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`r`.`trx_query` AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`b`.`trx_query` AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(current_timestamp(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat(\'KILL QUERY \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat(\'KILL \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on(`b`.`trx_id` = `w`.`blocking_trx_id`)) join `information_schema`.`innodb_trx` `r` on(`r`.`trx_id` = `w`.`requesting_trx_id`)) join `information_schema`.`innodb_locks` `bl` on(`bl`.`lock_id` = `w`.`blocking_lock_id`)) join `information_schema`.`innodb_locks` `rl` on(`rl`.`lock_id` = `w`.`requested_lock_id`)) order by `r`.`trx_wait_started` +md5=a220fb929bcd0fe52730169f87db8aaa +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139538738 +create-version=2 +source=SELECT r.trx_wait_started AS wait_started,\n TIMEDIFF(NOW(), r.trx_wait_started) AS wait_age,\n TIMESTAMPDIFF(SECOND, r.trx_wait_started, NOW()) AS wait_age_secs,\n rl.lock_table AS locked_table,\n rl.lock_index AS locked_index,\n rl.lock_type AS locked_type,\n r.trx_id AS waiting_trx_id,\n r.trx_started as waiting_trx_started,\n TIMEDIFF(NOW(), r.trx_started) AS waiting_trx_age,\n r.trx_rows_locked AS waiting_trx_rows_locked,\n r.trx_rows_modified AS waiting_trx_rows_modified,\n r.trx_mysql_thread_id AS waiting_pid,\n r.trx_query AS waiting_query,\n rl.lock_id AS waiting_lock_id,\n rl.lock_mode AS waiting_lock_mode,\n b.trx_id AS blocking_trx_id,\n b.trx_mysql_thread_id AS blocking_pid,\n b.trx_query AS blocking_query,\n bl.lock_id AS blocking_lock_id,\n bl.lock_mode AS blocking_lock_mode,\n b.trx_started AS blocking_trx_started,\n TIMEDIFF(NOW(), b.trx_started) AS blocking_trx_age,\n b.trx_rows_locked AS blocking_trx_rows_locked,\n b.trx_rows_modified AS blocking_trx_rows_modified,\n CONCAT(\'KILL QUERY \', b.trx_mysql_thread_id) AS sql_kill_blocking_query,\n CONCAT(\'KILL \', b.trx_mysql_thread_id) AS sql_kill_blocking_connection\n FROM information_schema.innodb_lock_waits w\n INNER JOIN information_schema.innodb_trx b ON b.trx_id = w.blocking_trx_id\n INNER JOIN information_schema.innodb_trx r ON r.trx_id = w.requesting_trx_id\n INNER JOIN information_schema.innodb_locks bl ON bl.lock_id = w.blocking_lock_id\n INNER JOIN information_schema.innodb_locks rl ON rl.lock_id = w.requested_lock_id\n ORDER BY r.trx_wait_started; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `r`.`trx_wait_started` AS `wait_started`,timediff(current_timestamp(),`r`.`trx_wait_started`) AS `wait_age`,timestampdiff(SECOND,`r`.`trx_wait_started`,current_timestamp()) AS `wait_age_secs`,`rl`.`lock_table` AS `locked_table`,`rl`.`lock_index` AS `locked_index`,`rl`.`lock_type` AS `locked_type`,`r`.`trx_id` AS `waiting_trx_id`,`r`.`trx_started` AS `waiting_trx_started`,timediff(current_timestamp(),`r`.`trx_started`) AS `waiting_trx_age`,`r`.`trx_rows_locked` AS `waiting_trx_rows_locked`,`r`.`trx_rows_modified` AS `waiting_trx_rows_modified`,`r`.`trx_mysql_thread_id` AS `waiting_pid`,`r`.`trx_query` AS `waiting_query`,`rl`.`lock_id` AS `waiting_lock_id`,`rl`.`lock_mode` AS `waiting_lock_mode`,`b`.`trx_id` AS `blocking_trx_id`,`b`.`trx_mysql_thread_id` AS `blocking_pid`,`b`.`trx_query` AS `blocking_query`,`bl`.`lock_id` AS `blocking_lock_id`,`bl`.`lock_mode` AS `blocking_lock_mode`,`b`.`trx_started` AS `blocking_trx_started`,timediff(current_timestamp(),`b`.`trx_started`) AS `blocking_trx_age`,`b`.`trx_rows_locked` AS `blocking_trx_rows_locked`,`b`.`trx_rows_modified` AS `blocking_trx_rows_modified`,concat(\'KILL QUERY \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_query`,concat(\'KILL \',`b`.`trx_mysql_thread_id`) AS `sql_kill_blocking_connection` from ((((`information_schema`.`innodb_lock_waits` `w` join `information_schema`.`innodb_trx` `b` on(`b`.`trx_id` = `w`.`blocking_trx_id`)) join `information_schema`.`innodb_trx` `r` on(`r`.`trx_id` = `w`.`requesting_trx_id`)) join `information_schema`.`innodb_locks` `bl` on(`bl`.`lock_id` = `w`.`blocking_lock_id`)) join `information_schema`.`innodb_locks` `rl` on(`rl`.`lock_id` = `w`.`requested_lock_id`)) order by `r`.`trx_wait_started` +mariadb-version=110502 diff --git a/db/sys/x@0024io_by_thread_by_latency.frm b/db/sys/x@0024io_by_thread_by_latency.frm new file mode 100755 index 0000000..396aec4 --- /dev/null +++ b/db/sys/x@0024io_by_thread_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) where `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0 group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=29975fcb1586f6e3585d5fd6a60de8e5 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139607146 +create-version=2 +source=SELECT IF(processlist_id IS NULL,\n SUBSTRING_INDEX(name, \'/\', -1),\n CONCAT(processlist_user, \'@\', processlist_host)\n ) user,\n SUM(count_star) total,\n SUM(sum_timer_wait) total_latency,\n MIN(min_timer_wait) min_latency,\n AVG(avg_timer_wait) avg_latency,\n MAX(max_timer_wait) max_latency,\n thread_id,\n processlist_id\n FROM performance_schema.events_waits_summary_by_thread_by_event_name\n LEFT JOIN performance_schema.threads USING (thread_id)\n WHERE event_name LIKE \'wait/io/file/%\'\n AND sum_timer_wait > 0\n GROUP BY thread_id, processlist_id, user\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) AS `user`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` AS `thread_id`,`performance_schema`.`threads`.`PROCESSLIST_ID` AS `processlist_id` from (`performance_schema`.`events_waits_summary_by_thread_by_event_name` left join `performance_schema`.`threads` on(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) where `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT` > 0 group by `performance_schema`.`events_waits_summary_by_thread_by_event_name`.`THREAD_ID`,`performance_schema`.`threads`.`PROCESSLIST_ID`,if(`performance_schema`.`threads`.`PROCESSLIST_ID` is null,substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),concat(`performance_schema`.`threads`.`PROCESSLIST_USER`,\'@\',`performance_schema`.`threads`.`PROCESSLIST_HOST`)) order by sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024io_global_by_file_by_bytes.frm b/db/sys/x@0024io_global_by_file_by_bytes.frm new file mode 100755 index 0000000..ab2c9c2 --- /dev/null +++ b/db/sys/x@0024io_global_by_file_by_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0),0.00) AS `avg_write`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total`,ifnull(round(100 - `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`,0) * 100,2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` desc +md5=f8ce3994ef1b5e0e16bba41ce17bacf9 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139620782 +create-version=2 +source=SELECT file_name AS file,\n count_read,\n sum_number_of_bytes_read AS total_read,\n IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0) AS avg_read,\n count_write,\n sum_number_of_bytes_write AS total_written,\n IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0.00) AS avg_write,\n sum_number_of_bytes_read + sum_number_of_bytes_write AS total,\n IFNULL(ROUND(100-((sum_number_of_bytes_read/ NULLIF((sum_number_of_bytes_read+sum_number_of_bytes_write), 0))*100), 2), 0.00) AS write_pct\n FROM performance_schema.file_summary_by_instance\n ORDER BY sum_number_of_bytes_read + sum_number_of_bytes_write DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`,0),0.00) AS `avg_write`,`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total`,ifnull(round(100 - `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`,0) * 100,2),0.00) AS `write_pct` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ` + `performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE` desc +mariadb-version=110502 diff --git a/db/sys/x@0024io_global_by_file_by_latency.frm b/db/sys/x@0024io_global_by_file_by_latency.frm new file mode 100755 index 0000000..43bb5c2 --- /dev/null +++ b/db/sys/x@0024io_global_by_file_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC` AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc +md5=7dd2b8d418cc363387dfae597c25a9f4 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139636367 +create-version=2 +source=SELECT file_name AS file,\n count_star AS total,\n sum_timer_wait AS total_latency,\n count_read,\n sum_timer_read AS read_latency,\n count_write,\n sum_timer_write AS write_latency,\n count_misc,\n sum_timer_misc AS misc_latency\n FROM performance_schema.file_summary_by_instance\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`file_summary_by_instance`.`FILE_NAME` AS `file`,`performance_schema`.`file_summary_by_instance`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC` AS `misc_latency` from `performance_schema`.`file_summary_by_instance` order by `performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024io_global_by_wait_by_bytes.frm b/db/sys/x@0024io_global_by_wait_by_bytes.frm new file mode 100755 index 0000000..80dd9f7 --- /dev/null +++ b/db/sys/x@0024io_global_by_wait_by_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT` AS `min_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0) AS `avg_written`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` desc +md5=4e712a79cda141c8bd60eb52f295fac7 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139650833 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) AS event_name,\n count_star AS total,\n sum_timer_wait AS total_latency,\n min_timer_wait AS min_latency,\n avg_timer_wait AS avg_latency,\n max_timer_wait AS max_latency,\n count_read,\n sum_number_of_bytes_read AS total_read,\n IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0) AS avg_read,\n count_write,\n sum_number_of_bytes_write AS total_written,\n IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0) AS avg_written,\n sum_number_of_bytes_write + sum_number_of_bytes_read AS total_requested\n FROM performance_schema.file_summary_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n AND count_star > 0\n ORDER BY sum_number_of_bytes_write + sum_number_of_bytes_read DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT` AS `min_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0) AS `avg_written`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_requested` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` + `performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` desc +mariadb-version=110502 diff --git a/db/sys/x@0024io_global_by_wait_by_latency.frm b/db/sys/x@0024io_global_by_wait_by_latency.frm new file mode 100755 index 0000000..b7fa8ca --- /dev/null +++ b/db/sys/x@0024io_global_by_wait_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC` AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc +md5=f414c9e62430c6f80dbc0bc5159ae49c +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139664215 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) AS event_name,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency,\n max_timer_wait AS max_latency,\n sum_timer_read AS read_latency,\n sum_timer_write AS write_latency,\n sum_timer_misc AS misc_latency,\n count_read,\n sum_number_of_bytes_read AS total_read,\n IFNULL(sum_number_of_bytes_read / NULLIF(count_read, 0), 0) AS avg_read,\n count_write,\n sum_number_of_bytes_write AS total_written,\n IFNULL(sum_number_of_bytes_write / NULLIF(count_write, 0), 0) AS avg_written\n FROM performance_schema.file_summary_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n AND count_star > 0\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\'/\',-2) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC` AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull(`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` / nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0),0) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where `performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' and `performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0 order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024latest_file_io.frm b/db/sys/x@0024latest_file_io.frm new file mode 100755 index 0000000..d39190e --- /dev/null +++ b/db/sys/x@0024latest_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`information_schema`.`processlist`.`ID` is null,concat(substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),\':\',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,\'@\',`information_schema`.`processlist`.`HOST`,\':\',`information_schema`.`processlist`.`ID`)) AS `thread`,`performance_schema`.`events_waits_history_long`.`OBJECT_NAME` AS `file`,`performance_schema`.`events_waits_history_long`.`TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES` AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on(`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) left join `information_schema`.`processlist` on(`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`)) where `performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null and `performance_schema`.`events_waits_history_long`.`EVENT_NAME` like \'wait/io/file/%\' order by `performance_schema`.`events_waits_history_long`.`TIMER_START` +md5=57dc75fb0d8f65a34b4a54eed20c702c +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139595949 +create-version=2 +source=SELECT IF(id IS NULL,\n CONCAT(SUBSTRING_INDEX(name, \'/\', -1), \':\', thread_id),\n CONCAT(user, \'@\', host, \':\', id)\n ) thread,\n object_name file,\n timer_wait AS latency,\n operation,\n number_of_bytes AS requested\n FROM performance_schema.events_waits_history_long\n JOIN performance_schema.threads USING (thread_id)\n LEFT JOIN information_schema.processlist ON processlist_id = id\n WHERE object_name IS NOT NULL\n AND event_name LIKE \'wait/io/file/%\'\n ORDER BY timer_start; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`information_schema`.`processlist`.`ID` is null,concat(substring_index(`performance_schema`.`threads`.`NAME`,\'/\',-1),\':\',`performance_schema`.`events_waits_history_long`.`THREAD_ID`),concat(`information_schema`.`processlist`.`USER`,\'@\',`information_schema`.`processlist`.`HOST`,\':\',`information_schema`.`processlist`.`ID`)) AS `thread`,`performance_schema`.`events_waits_history_long`.`OBJECT_NAME` AS `file`,`performance_schema`.`events_waits_history_long`.`TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_history_long`.`OPERATION` AS `operation`,`performance_schema`.`events_waits_history_long`.`NUMBER_OF_BYTES` AS `requested` from ((`performance_schema`.`events_waits_history_long` join `performance_schema`.`threads` on(`performance_schema`.`events_waits_history_long`.`THREAD_ID` = `performance_schema`.`threads`.`THREAD_ID`)) left join `information_schema`.`processlist` on(`performance_schema`.`threads`.`PROCESSLIST_ID` = `information_schema`.`processlist`.`ID`)) where `performance_schema`.`events_waits_history_long`.`OBJECT_NAME` is not null and `performance_schema`.`events_waits_history_long`.`EVENT_NAME` like \'wait/io/file/%\' order by `performance_schema`.`events_waits_history_long`.`TIMER_START` +mariadb-version=110502 diff --git a/db/sys/x@0024memory_by_host_by_current_bytes.frm b/db/sys/x@0024memory_by_host_by_current_bytes.frm new file mode 100755 index 0000000..9e59791 --- /dev/null +++ b/db/sys/x@0024memory_by_host_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=8830b3e5e58a5783b9ac513f099e5590 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139688428 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(current_count_used) AS current_count_used,\n SUM(current_number_of_bytes_used) AS current_allocated,\n IFNULL(SUM(current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0) AS current_avg_alloc,\n MAX(current_number_of_bytes_used) AS current_max_alloc,\n SUM(sum_number_of_bytes_alloc) AS total_allocated\n FROM performance_schema.memory_summary_by_host_by_event_name\n GROUP BY IF(host IS NULL, \'background\', host)\n ORDER BY SUM(current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) AS `host`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_host_by_event_name` group by if(`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST` is null,\'background\',`performance_schema`.`memory_summary_by_host_by_event_name`.`HOST`) order by sum(`performance_schema`.`memory_summary_by_host_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024memory_by_thread_by_current_bytes.frm b/db/sys/x@0024memory_by_thread_by_current_bytes.frm new file mode 100755 index 0000000..3dbc07c --- /dev/null +++ b/db/sys/x@0024memory_by_thread_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `t`.`THREAD_ID` AS `thread_id`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on(`mt`.`THREAD_ID` = `t`.`THREAD_ID`)) group by `t`.`THREAD_ID`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=090446b6a45d058a679ed900e7b94967 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139702408 +create-version=2 +source=SELECT t.thread_id,\n IF(t.name = \'thread/sql/one_connection\',\n CONCAT(t.processlist_user, \'@\', t.processlist_host),\n REPLACE(t.name, \'thread/\', \'\')) user,\n SUM(mt.current_count_used) AS current_count_used,\n SUM(mt.current_number_of_bytes_used) AS current_allocated,\n IFNULL(SUM(mt.current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0) AS current_avg_alloc,\n MAX(mt.current_number_of_bytes_used) AS current_max_alloc,\n SUM(mt.sum_number_of_bytes_alloc) AS total_allocated\n FROM performance_schema.memory_summary_by_thread_by_event_name AS mt\n JOIN performance_schema.threads AS t USING (thread_id)\n GROUP BY thread_id, IF(t.name = \'thread/sql/one_connection\',\n CONCAT(t.processlist_user, \'@\', t.processlist_host),\n REPLACE(t.name, \'thread/\', \'\'))\n ORDER BY SUM(mt.current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `t`.`THREAD_ID` AS `thread_id`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`mt`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on(`mt`.`THREAD_ID` = `t`.`THREAD_ID`)) group by `t`.`THREAD_ID`,if(`t`.`NAME` = \'thread/sql/one_connection\',concat(`t`.`PROCESSLIST_USER`,\'@\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\'thread/\',\'\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024memory_by_user_by_current_bytes.frm b/db/sys/x@0024memory_by_user_by_current_bytes.frm new file mode 100755 index 0000000..ae822ac --- /dev/null +++ b/db/sys/x@0024memory_by_user_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +md5=2ae77cc919014e48af09252ebc44d28b +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139676330 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(current_count_used) AS current_count_used,\n SUM(current_number_of_bytes_used) AS current_allocated,\n IFNULL(SUM(current_number_of_bytes_used) / NULLIF(SUM(current_count_used), 0), 0) AS current_avg_alloc,\n MAX(current_number_of_bytes_used) AS current_max_alloc,\n SUM(sum_number_of_bytes_alloc) AS total_allocated\n FROM performance_schema.memory_summary_by_user_by_event_name\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(current_number_of_bytes_used) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`) AS `current_count_used`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_allocated`,ifnull(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) / nullif(sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_COUNT_USED`),0),0) AS `current_avg_alloc`,max(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `current_max_alloc`,sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`SUM_NUMBER_OF_BYTES_ALLOC`) AS `total_allocated` from `performance_schema`.`memory_summary_by_user_by_event_name` group by if(`performance_schema`.`memory_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`memory_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`memory_summary_by_user_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024memory_global_by_current_bytes.frm b/db/sys/x@0024memory_global_by_current_bytes.frm new file mode 100755 index 0000000..51cc5b7 --- /dev/null +++ b/db/sys/x@0024memory_global_by_current_bytes.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` AS `current_alloc`,ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0),0) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` AS `high_alloc`,ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0),0) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0 order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc +md5=de3d03378b143da6e5496c82721af418 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139715631 +create-version=2 +source=SELECT event_name,\n current_count_used AS current_count,\n current_number_of_bytes_used AS current_alloc,\n IFNULL(current_number_of_bytes_used / NULLIF(current_count_used, 0), 0) AS current_avg_alloc,\n high_count_used AS high_count,\n high_number_of_bytes_used AS high_alloc,\n IFNULL(high_number_of_bytes_used / NULLIF(high_count_used, 0), 0) AS high_avg_alloc\n FROM performance_schema.memory_summary_global_by_event_name\n WHERE current_number_of_bytes_used > 0\n ORDER BY current_number_of_bytes_used DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`memory_summary_global_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED` AS `current_count`,`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` AS `current_alloc`,ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_COUNT_USED`,0),0) AS `current_avg_alloc`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED` AS `high_count`,`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` AS `high_alloc`,ifnull(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_NUMBER_OF_BYTES_USED` / nullif(`performance_schema`.`memory_summary_global_by_event_name`.`HIGH_COUNT_USED`,0),0) AS `high_avg_alloc` from `performance_schema`.`memory_summary_global_by_event_name` where `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` > 0 order by `performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED` desc +mariadb-version=110502 diff --git a/db/sys/x@0024memory_global_total.frm b/db/sys/x@0024memory_global_total.frm new file mode 100755 index 0000000..73d2bd4 --- /dev/null +++ b/db/sys/x@0024memory_global_total.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name` +md5=6f943b5a93d4d8b6c06840dbfa5027a9 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139728100 +create-version=2 +source=SELECT SUM(CURRENT_NUMBER_OF_BYTES_USED) total_allocated\n FROM performance_schema.memory_summary_global_by_event_name; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select sum(`performance_schema`.`memory_summary_global_by_event_name`.`CURRENT_NUMBER_OF_BYTES_USED`) AS `total_allocated` from `performance_schema`.`memory_summary_global_by_event_name` +mariadb-version=110502 diff --git a/db/sys/x@0024processlist.frm b/db/sys/x@0024processlist.frm new file mode 100755 index 0000000..b774bff --- /dev/null +++ b/db/sys/x@0024processlist.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if(`pps`.`NAME` = \'thread/sql/one_connection\',concat(`pps`.`PROCESSLIST_USER`,\'@\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\'thread/\',\'\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`pps`.`PROCESSLIST_INFO` AS `current_statement`,if(`esc`.`END_EVENT_ID` is null,`esc`.`TIMER_WAIT`,NULL) AS `statement_latency`,if(`esc`.`END_EVENT_ID` is null,round(100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`),2),NULL) AS `progress`,`esc`.`LOCK_TIME` AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(`esc`.`NO_GOOD_INDEX_USED` > 0 or `esc`.`NO_INDEX_USED` > 0,\'YES\',\'NO\') AS `full_scan`,if(`esc`.`END_EVENT_ID` is not null,`esc`.`SQL_TEXT`,NULL) AS `last_statement`,if(`esc`.`END_EVENT_ID` is not null,`esc`.`TIMER_WAIT`,NULL) AS `last_statement_latency`,`mem`.`current_allocated` AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',`ewc`.`TIMER_WAIT`) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`etc`.`TIMER_WAIT` AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on(`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`)) left join `performance_schema`.`events_stages_current` `estc` on(`pps`.`THREAD_ID` = `estc`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `esc` on(`pps`.`THREAD_ID` = `esc`.`THREAD_ID`)) left join `performance_schema`.`events_transactions_current` `etc` on(`pps`.`THREAD_ID` = `etc`.`THREAD_ID`)) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on(`pps`.`THREAD_ID` = `mem`.`thread_id`)) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_pid`.`ATTR_NAME` = \'_pid\')) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_progname`.`ATTR_NAME` = \'program_name\')) order by `pps`.`PROCESSLIST_TIME` desc,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',`ewc`.`TIMER_WAIT`) desc +md5=42b975f81c88e5010bd88768cd426eb7 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140180443 +create-version=2 +source=SELECT pps.thread_id AS thd_id,\n pps.processlist_id AS conn_id,\n IF(pps.name = \'thread/sql/one_connection\',\n CONCAT(pps.processlist_user, \'@\', pps.processlist_host),\n REPLACE(pps.name, \'thread/\', \'\')) user,\n pps.processlist_db AS db,\n pps.processlist_command AS command,\n pps.processlist_state AS state,\n pps.processlist_time AS time,\n pps.processlist_info AS current_statement,\n IF(esc.end_event_id IS NULL,\n esc.timer_wait,\n NULL) AS statement_latency,\n IF(esc.end_event_id IS NULL,\n ROUND(100 * (estc.work_completed / estc.work_estimated), 2),\n NULL) AS progress,\n esc.lock_time AS lock_latency,\n esc.rows_examined AS rows_examined,\n esc.rows_sent AS rows_sent,\n esc.rows_affected AS rows_affected,\n esc.created_tmp_tables AS tmp_tables,\n esc.created_tmp_disk_tables AS tmp_disk_tables,\n IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0, \'YES\', \'NO\') AS full_scan,\n IF(esc.end_event_id IS NOT NULL,\n esc.sql_text,\n NULL) AS last_statement,\n IF(esc.end_event_id IS NOT NULL,\n esc.timer_wait,\n NULL) AS last_statement_latency,\n mem.current_allocated AS current_memory,\n ewc.event_name AS last_wait,\n IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL,\n \'Still Waiting\',\n ewc.timer_wait) last_wait_latency,\n ewc.source,\n etc.timer_wait AS trx_latency,\n etc.state AS trx_state,\n etc.autocommit AS trx_autocommit,\n conattr_pid.attr_value as pid,\n conattr_progname.attr_value as program_name\n FROM performance_schema.threads AS pps\n LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id)\n LEFT JOIN performance_schema.events_stages_current AS estc USING (thread_id)\n LEFT JOIN performance_schema.events_statements_current AS esc USING (thread_id)\n LEFT JOIN performance_schema.events_transactions_current AS etc USING (thread_id)\n LEFT JOIN sys.x$memory_by_thread_by_current_bytes AS mem USING (thread_id)\n LEFT JOIN performance_schema.session_connect_attrs AS conattr_pid\n ON conattr_pid.processlist_id=pps.processlist_id and conattr_pid.attr_name=\'_pid\'\n LEFT JOIN performance_schema.session_connect_attrs AS conattr_progname\n ON conattr_progname.processlist_id=pps.processlist_id and conattr_progname.attr_name=\'program_name\'\n ORDER BY pps.processlist_time DESC, last_wait_latency DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if(`pps`.`NAME` = \'thread/sql/one_connection\',concat(`pps`.`PROCESSLIST_USER`,\'@\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\'thread/\',\'\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`pps`.`PROCESSLIST_INFO` AS `current_statement`,if(`esc`.`END_EVENT_ID` is null,`esc`.`TIMER_WAIT`,NULL) AS `statement_latency`,if(`esc`.`END_EVENT_ID` is null,round(100 * (`estc`.`WORK_COMPLETED` / `estc`.`WORK_ESTIMATED`),2),NULL) AS `progress`,`esc`.`LOCK_TIME` AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(`esc`.`NO_GOOD_INDEX_USED` > 0 or `esc`.`NO_INDEX_USED` > 0,\'YES\',\'NO\') AS `full_scan`,if(`esc`.`END_EVENT_ID` is not null,`esc`.`SQL_TEXT`,NULL) AS `last_statement`,if(`esc`.`END_EVENT_ID` is not null,`esc`.`TIMER_WAIT`,NULL) AS `last_statement_latency`,`mem`.`current_allocated` AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',`ewc`.`TIMER_WAIT`) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`etc`.`TIMER_WAIT` AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on(`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`)) left join `performance_schema`.`events_stages_current` `estc` on(`pps`.`THREAD_ID` = `estc`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `esc` on(`pps`.`THREAD_ID` = `esc`.`THREAD_ID`)) left join `performance_schema`.`events_transactions_current` `etc` on(`pps`.`THREAD_ID` = `etc`.`THREAD_ID`)) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on(`pps`.`THREAD_ID` = `mem`.`thread_id`)) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_pid`.`ATTR_NAME` = \'_pid\')) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID` and `conattr_progname`.`ATTR_NAME` = \'program_name\')) order by `pps`.`PROCESSLIST_TIME` desc,if(`ewc`.`END_EVENT_ID` is null and `ewc`.`EVENT_NAME` is not null,\'Still Waiting\',`ewc`.`TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm b/db/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm new file mode 100755 index 0000000..63d626a --- /dev/null +++ b/db/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `s2`.`avg_us` AS `avg_us`,ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) AS `percentile` from (`sys`.`x$ps_digest_avg_latency_distribution` `s1` join `sys`.`x$ps_digest_avg_latency_distribution` `s2` on(`s1`.`avg_us` <= `s2`.`avg_us`)) group by `s2`.`avg_us` having ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) > 0.95 order by ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) limit 1 +md5=9d4c91bfffb022a4413bbda627e2c569 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139866830 +create-version=2 +source=SELECT s2.avg_us avg_us,\n IFNULL(SUM(s1.cnt)/NULLIF((SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest), 0), 0) percentile\n FROM sys.x$ps_digest_avg_latency_distribution AS s1\n JOIN sys.x$ps_digest_avg_latency_distribution AS s2\n ON s1.avg_us <= s2.avg_us\n GROUP BY s2.avg_us\nHAVING IFNULL(SUM(s1.cnt)/NULLIF((SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest), 0), 0) > 0.95\n ORDER BY percentile\n LIMIT 1; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `s2`.`avg_us` AS `avg_us`,ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) AS `percentile` from (`sys`.`x$ps_digest_avg_latency_distribution` `s1` join `sys`.`x$ps_digest_avg_latency_distribution` `s2` on(`s1`.`avg_us` <= `s2`.`avg_us`)) group by `s2`.`avg_us` having ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) > 0.95 order by ifnull(sum(`s1`.`cnt`) / nullif((select count(0) from `performance_schema`.`events_statements_summary_by_digest`),0),0) limit 1 +mariadb-version=110502 diff --git a/db/sys/x@0024ps_digest_avg_latency_distribution.frm b/db/sys/x@0024ps_digest_avg_latency_distribution.frm new file mode 100755 index 0000000..9fa2e72 --- /dev/null +++ b/db/sys/x@0024ps_digest_avg_latency_distribution.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select count(0) AS `cnt`,round(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` / 1000000,0) AS `avg_us` from `performance_schema`.`events_statements_summary_by_digest` group by round(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` / 1000000,0) +md5=90f26794b9a8e64fa4b20b5972595230 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139859009 +create-version=2 +source=SELECT COUNT(*) cnt,\n ROUND(avg_timer_wait/1000000) AS avg_us\n FROM performance_schema.events_statements_summary_by_digest\n GROUP BY avg_us; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select count(0) AS `cnt`,round(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` / 1000000,0) AS `avg_us` from `performance_schema`.`events_statements_summary_by_digest` group by round(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` / 1000000,0) +mariadb-version=110502 diff --git a/db/sys/x@0024ps_schema_table_statistics_io.frm b/db/sys/x@0024ps_schema_table_statistics_io.frm new file mode 100755 index 0000000..78da3e5 --- /dev/null +++ b/db/sys/x@0024ps_schema_table_statistics_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `extract_schema_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_schema`,`extract_table_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_name`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`) AS `count_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `sum_number_of_bytes_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `sum_timer_read`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`) AS `count_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `sum_number_of_bytes_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `sum_timer_write`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_MISC`) AS `count_misc`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `sum_timer_misc` from `performance_schema`.`file_summary_by_instance` group by `extract_schema_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`),`extract_table_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) +md5=1cbc73d7bab53e57bfac894c9697fd30 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139748459 +create-version=2 +source=SELECT extract_schema_from_file_name(file_name) AS table_schema,\n extract_table_from_file_name(file_name) AS table_name,\n SUM(count_read) AS count_read,\n SUM(sum_number_of_bytes_read) AS sum_number_of_bytes_read,\n SUM(sum_timer_read) AS sum_timer_read,\n SUM(count_write) AS count_write,\n SUM(sum_number_of_bytes_write) AS sum_number_of_bytes_write,\n SUM(sum_timer_write) AS sum_timer_write,\n SUM(count_misc) AS count_misc,\n SUM(sum_timer_misc) AS sum_timer_misc\n FROM performance_schema.file_summary_by_instance\n GROUP BY table_schema, table_name; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `extract_schema_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_schema`,`extract_table_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) AS `table_name`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_READ`) AS `count_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_READ`) AS `sum_number_of_bytes_read`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `sum_timer_read`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE`) AS `count_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_NUMBER_OF_BYTES_WRITE`) AS `sum_number_of_bytes_write`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `sum_timer_write`,sum(`performance_schema`.`file_summary_by_instance`.`COUNT_MISC`) AS `count_misc`,sum(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_MISC`) AS `sum_timer_misc` from `performance_schema`.`file_summary_by_instance` group by `extract_schema_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`),`extract_table_from_file_name`(`performance_schema`.`file_summary_by_instance`.`FILE_NAME`) +mariadb-version=110502 diff --git a/db/sys/x@0024schema_flattened_keys.frm b/db/sys/x@0024schema_flattened_keys.frm new file mode 100755 index 0000000..fb96f2c --- /dev/null +++ b/db/sys/x@0024schema_flattened_keys.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `information_schema`.`STATISTICS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`STATISTICS`.`TABLE_NAME` AS `table_name`,`information_schema`.`STATISTICS`.`INDEX_NAME` AS `index_name`,max(`information_schema`.`STATISTICS`.`NON_UNIQUE`) AS `non_unique`,max(if(`information_schema`.`STATISTICS`.`SUB_PART` is null,0,1)) AS `subpart_exists`,group_concat(`information_schema`.`STATISTICS`.`COLUMN_NAME` order by `information_schema`.`STATISTICS`.`SEQ_IN_INDEX` ASC separator \',\') AS `index_columns` from `INFORMATION_SCHEMA`.`STATISTICS` where `information_schema`.`STATISTICS`.`INDEX_TYPE` = \'BTREE\' and `information_schema`.`STATISTICS`.`TABLE_SCHEMA` not in (\'mysql\',\'sys\',\'INFORMATION_SCHEMA\',\'PERFORMANCE_SCHEMA\') group by `information_schema`.`STATISTICS`.`TABLE_SCHEMA`,`information_schema`.`STATISTICS`.`TABLE_NAME`,`information_schema`.`STATISTICS`.`INDEX_NAME` +md5=e009f14e47310b8c3894338840733af0 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139561422 +create-version=2 +source=SELECT\n TABLE_SCHEMA,\n TABLE_NAME,\n INDEX_NAME,\n MAX(NON_UNIQUE) AS non_unique,\n MAX(IF(SUB_PART IS NULL, 0, 1)) AS subpart_exists,\n GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS index_columns\n FROM INFORMATION_SCHEMA.STATISTICS\n WHERE\n INDEX_TYPE=\'BTREE\'\n AND TABLE_SCHEMA NOT IN (\'mysql\', \'sys\', \'INFORMATION_SCHEMA\', \'PERFORMANCE_SCHEMA\')\n GROUP BY\n TABLE_SCHEMA, TABLE_NAME, INDEX_NAME; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `information_schema`.`STATISTICS`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`STATISTICS`.`TABLE_NAME` AS `table_name`,`information_schema`.`STATISTICS`.`INDEX_NAME` AS `index_name`,max(`information_schema`.`STATISTICS`.`NON_UNIQUE`) AS `non_unique`,max(if(`information_schema`.`STATISTICS`.`SUB_PART` is null,0,1)) AS `subpart_exists`,group_concat(`information_schema`.`STATISTICS`.`COLUMN_NAME` order by `information_schema`.`STATISTICS`.`SEQ_IN_INDEX` ASC separator \',\') AS `index_columns` from `INFORMATION_SCHEMA`.`STATISTICS` where `information_schema`.`STATISTICS`.`INDEX_TYPE` = \'BTREE\' and `information_schema`.`STATISTICS`.`TABLE_SCHEMA` not in (\'mysql\',\'sys\',\'INFORMATION_SCHEMA\',\'PERFORMANCE_SCHEMA\') group by `information_schema`.`STATISTICS`.`TABLE_SCHEMA`,`information_schema`.`STATISTICS`.`TABLE_NAME`,`information_schema`.`STATISTICS`.`INDEX_NAME` +mariadb-version=110502 diff --git a/db/sys/x@0024schema_index_statistics.frm b/db/sys/x@0024schema_index_statistics.frm new file mode 100755 index 0000000..2725c2f --- /dev/null +++ b/db/sys/x@0024schema_index_statistics.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH` AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE` AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc +md5=5844eee9b3fc97a283ca9e10e94f2258 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139741748 +create-version=2 +source=SELECT OBJECT_SCHEMA AS table_schema,\n OBJECT_NAME AS table_name,\n INDEX_NAME as index_name,\n COUNT_FETCH AS rows_selected,\n SUM_TIMER_FETCH AS select_latency,\n COUNT_INSERT AS rows_inserted,\n SUM_TIMER_INSERT AS insert_latency,\n COUNT_UPDATE AS rows_updated,\n SUM_TIMER_UPDATE AS update_latency,\n COUNT_DELETE AS rows_deleted,\n SUM_TIMER_INSERT AS delete_latency\n FROM performance_schema.table_io_waits_summary_by_index_usage\n WHERE index_name IS NOT NULL\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `table_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `table_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` AS `index_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_FETCH` AS `rows_selected`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_FETCH` AS `select_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_INSERT` AS `rows_inserted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `insert_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_UPDATE` AS `rows_updated`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_UPDATE` AS `update_latency`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_DELETE` AS `rows_deleted`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_INSERT` AS `delete_latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is not null order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024schema_table_lock_waits.frm b/db/sys/x@0024schema_table_lock_waits.frm new file mode 100755 index 0000000..de92285 --- /dev/null +++ b/db/sys/x@0024schema_table_lock_waits.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`pt`.`PROCESSLIST_INFO` AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat(\'KILL QUERY \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat(\'KILL \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE` and `g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA` and `g`.`OBJECT_NAME` = `p`.`OBJECT_NAME` and `g`.`LOCK_STATUS` = \'GRANTED\' and `p`.`LOCK_STATUS` = \'PENDING\')) join `performance_schema`.`threads` `gt` on(`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`)) join `performance_schema`.`threads` `pt` on(`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `gs` on(`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `ps` on(`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`)) where `g`.`OBJECT_TYPE` = \'TABLE\' +md5=9bde9b7793a0d9ebd1c022f6e54a7ae2 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139812729 +create-version=2 +source=SELECT g.object_schema AS object_schema,\n g.object_name AS object_name,\n pt.thread_id AS waiting_thread_id,\n pt.processlist_id AS waiting_pid,\n sys.ps_thread_account(p.owner_thread_id) AS waiting_account,\n p.lock_type AS waiting_lock_type,\n p.lock_duration AS waiting_lock_duration,\n pt.processlist_info AS waiting_query,\n pt.processlist_time AS waiting_query_secs,\n ps.rows_affected AS waiting_query_rows_affected,\n ps.rows_examined AS waiting_query_rows_examined,\n gt.thread_id AS blocking_thread_id,\n gt.processlist_id AS blocking_pid,\n sys.ps_thread_account(g.owner_thread_id) AS blocking_account,\n g.lock_type AS blocking_lock_type,\n g.lock_duration AS blocking_lock_duration,\n CONCAT(\'KILL QUERY \', gt.processlist_id) AS sql_kill_blocking_query,\n CONCAT(\'KILL \', gt.processlist_id) AS sql_kill_blocking_connection\n FROM performance_schema.metadata_locks g\n INNER JOIN performance_schema.metadata_locks p\n ON g.object_type = p.object_type\n AND g.object_schema = p.object_schema\n AND g.object_name = p.object_name\n AND g.lock_status = \'GRANTED\'\n AND p.lock_status = \'PENDING\'\n INNER JOIN performance_schema.threads gt ON g.owner_thread_id = gt.thread_id\n INNER JOIN performance_schema.threads pt ON p.owner_thread_id = pt.thread_id\n LEFT JOIN performance_schema.events_statements_current gs ON g.owner_thread_id = gs.thread_id\n LEFT JOIN performance_schema.events_statements_current ps ON p.owner_thread_id = ps.thread_id\n WHERE g.object_type = \'TABLE\'; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `g`.`OBJECT_SCHEMA` AS `object_schema`,`g`.`OBJECT_NAME` AS `object_name`,`pt`.`THREAD_ID` AS `waiting_thread_id`,`pt`.`PROCESSLIST_ID` AS `waiting_pid`,`sys`.`ps_thread_account`(`p`.`OWNER_THREAD_ID`) AS `waiting_account`,`p`.`LOCK_TYPE` AS `waiting_lock_type`,`p`.`LOCK_DURATION` AS `waiting_lock_duration`,`pt`.`PROCESSLIST_INFO` AS `waiting_query`,`pt`.`PROCESSLIST_TIME` AS `waiting_query_secs`,`ps`.`ROWS_AFFECTED` AS `waiting_query_rows_affected`,`ps`.`ROWS_EXAMINED` AS `waiting_query_rows_examined`,`gt`.`THREAD_ID` AS `blocking_thread_id`,`gt`.`PROCESSLIST_ID` AS `blocking_pid`,`sys`.`ps_thread_account`(`g`.`OWNER_THREAD_ID`) AS `blocking_account`,`g`.`LOCK_TYPE` AS `blocking_lock_type`,`g`.`LOCK_DURATION` AS `blocking_lock_duration`,concat(\'KILL QUERY \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_query`,concat(\'KILL \',`gt`.`PROCESSLIST_ID`) AS `sql_kill_blocking_connection` from (((((`performance_schema`.`metadata_locks` `g` join `performance_schema`.`metadata_locks` `p` on(`g`.`OBJECT_TYPE` = `p`.`OBJECT_TYPE` and `g`.`OBJECT_SCHEMA` = `p`.`OBJECT_SCHEMA` and `g`.`OBJECT_NAME` = `p`.`OBJECT_NAME` and `g`.`LOCK_STATUS` = \'GRANTED\' and `p`.`LOCK_STATUS` = \'PENDING\')) join `performance_schema`.`threads` `gt` on(`g`.`OWNER_THREAD_ID` = `gt`.`THREAD_ID`)) join `performance_schema`.`threads` `pt` on(`p`.`OWNER_THREAD_ID` = `pt`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `gs` on(`g`.`OWNER_THREAD_ID` = `gs`.`THREAD_ID`)) left join `performance_schema`.`events_statements_current` `ps` on(`p`.`OWNER_THREAD_ID` = `ps`.`THREAD_ID`)) where `g`.`OBJECT_TYPE` = \'TABLE\' +mariadb-version=110502 diff --git a/db/sys/x@0024schema_table_statistics.frm b/db/sys/x@0024schema_table_statistics.frm new file mode 100755 index 0000000..49b0e1e --- /dev/null +++ b/db/sys/x@0024schema_table_statistics.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`SUM_TIMER_WAIT` AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +md5=bc53e98a227086ffb2e6185030b7fc95 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139763778 +create-version=2 +source=SELECT pst.object_schema AS table_schema,\n pst.object_name AS table_name,\n pst.sum_timer_wait AS total_latency,\n pst.count_fetch AS rows_fetched,\n pst.sum_timer_fetch AS fetch_latency,\n pst.count_insert AS rows_inserted,\n pst.sum_timer_insert AS insert_latency,\n pst.count_update AS rows_updated,\n pst.sum_timer_update AS update_latency,\n pst.count_delete AS rows_deleted,\n pst.sum_timer_delete AS delete_latency,\n fsbi.count_read AS io_read_requests,\n fsbi.sum_number_of_bytes_read AS io_read,\n fsbi.sum_timer_read AS io_read_latency,\n fsbi.count_write AS io_write_requests,\n fsbi.sum_number_of_bytes_write AS io_write,\n fsbi.sum_timer_write AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n fsbi.sum_timer_misc AS io_misc_latency\n FROM performance_schema.table_io_waits_summary_by_table AS pst\n LEFT JOIN x$ps_schema_table_statistics_io AS fsbi\n ON pst.object_schema = fsbi.table_schema\n AND pst.object_name = fsbi.table_name\n ORDER BY pst.sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`SUM_TIMER_WAIT` AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency` from (`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024schema_table_statistics_with_buffer.frm b/db/sys/x@0024schema_table_statistics_with_buffer.frm new file mode 100755 index 0000000..a5a523f --- /dev/null +++ b/db/sys/x@0024schema_table_statistics_with_buffer.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency`,`ibp`.`allocated` AS `innodb_buffer_allocated`,`ibp`.`data` AS `innodb_buffer_data`,`ibp`.`allocated` - `ibp`.`data` AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema` and `pst`.`OBJECT_NAME` = `ibp`.`object_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +md5=6028a2655b55a68d15450953ebc6eaae +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139779806 +create-version=2 +source=SELECT pst.object_schema AS table_schema,\n pst.object_name AS table_name,\n pst.count_fetch AS rows_fetched,\n pst.sum_timer_fetch AS fetch_latency,\n pst.count_insert AS rows_inserted,\n pst.sum_timer_insert AS insert_latency,\n pst.count_update AS rows_updated,\n pst.sum_timer_update AS update_latency,\n pst.count_delete AS rows_deleted,\n pst.sum_timer_delete AS delete_latency,\n fsbi.count_read AS io_read_requests,\n fsbi.sum_number_of_bytes_read AS io_read,\n fsbi.sum_timer_read AS io_read_latency,\n fsbi.count_write AS io_write_requests,\n fsbi.sum_number_of_bytes_write AS io_write,\n fsbi.sum_timer_write AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n fsbi.sum_timer_misc AS io_misc_latency,\n ibp.allocated AS innodb_buffer_allocated,\n ibp.data AS innodb_buffer_data,\n (ibp.allocated - ibp.data) AS innodb_buffer_free,\n ibp.pages AS innodb_buffer_pages,\n ibp.pages_hashed AS innodb_buffer_pages_hashed,\n ibp.pages_old AS innodb_buffer_pages_old,\n ibp.rows_cached AS innodb_buffer_rows_cached\n FROM performance_schema.table_io_waits_summary_by_table AS pst\n LEFT JOIN x$ps_schema_table_statistics_io AS fsbi\n ON pst.object_schema = fsbi.table_schema\n AND pst.object_name = fsbi.table_name\n LEFT JOIN sys.x$innodb_buffer_stats_by_table AS ibp\n ON pst.object_schema = ibp.object_schema\n AND pst.object_name = ibp.object_name\n ORDER BY pst.sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `pst`.`OBJECT_SCHEMA` AS `table_schema`,`pst`.`OBJECT_NAME` AS `table_name`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`pst`.`SUM_TIMER_FETCH` AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`pst`.`SUM_TIMER_INSERT` AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`pst`.`SUM_TIMER_UPDATE` AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`pst`.`SUM_TIMER_DELETE` AS `delete_latency`,`fsbi`.`count_read` AS `io_read_requests`,`fsbi`.`sum_number_of_bytes_read` AS `io_read`,`fsbi`.`sum_timer_read` AS `io_read_latency`,`fsbi`.`count_write` AS `io_write_requests`,`fsbi`.`sum_number_of_bytes_write` AS `io_write`,`fsbi`.`sum_timer_write` AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`fsbi`.`sum_timer_misc` AS `io_misc_latency`,`ibp`.`allocated` AS `innodb_buffer_allocated`,`ibp`.`data` AS `innodb_buffer_data`,`ibp`.`allocated` - `ibp`.`data` AS `innodb_buffer_free`,`ibp`.`pages` AS `innodb_buffer_pages`,`ibp`.`pages_hashed` AS `innodb_buffer_pages_hashed`,`ibp`.`pages_old` AS `innodb_buffer_pages_old`,`ibp`.`rows_cached` AS `innodb_buffer_rows_cached` from ((`performance_schema`.`table_io_waits_summary_by_table` `pst` left join `sys`.`x$ps_schema_table_statistics_io` `fsbi` on(`pst`.`OBJECT_SCHEMA` = `fsbi`.`table_schema` and `pst`.`OBJECT_NAME` = `fsbi`.`table_name`)) left join `sys`.`x$innodb_buffer_stats_by_table` `ibp` on(`pst`.`OBJECT_SCHEMA` = `ibp`.`object_schema` and `pst`.`OBJECT_NAME` = `ibp`.`object_name`)) order by `pst`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024schema_tables_with_full_table_scans.frm b/db/sys/x@0024schema_tables_with_full_table_scans.frm new file mode 100755 index 0000000..e3775c2 --- /dev/null +++ b/db/sys/x@0024schema_tables_with_full_table_scans.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0 order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc +md5=2a4a59ec97eaf3d4a3b09f58b253c058 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139791472 +create-version=2 +source=SELECT object_schema,\n object_name,\n count_read AS rows_full_scanned,\n sum_timer_wait AS latency\n FROM performance_schema.table_io_waits_summary_by_index_usage\n WHERE index_name IS NULL\n AND count_read > 0\n ORDER BY count_read DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_SCHEMA` AS `object_schema`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`OBJECT_NAME` AS `object_name`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` AS `rows_full_scanned`,`performance_schema`.`table_io_waits_summary_by_index_usage`.`SUM_TIMER_WAIT` AS `latency` from `performance_schema`.`table_io_waits_summary_by_index_usage` where `performance_schema`.`table_io_waits_summary_by_index_usage`.`INDEX_NAME` is null and `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` > 0 order by `performance_schema`.`table_io_waits_summary_by_index_usage`.`COUNT_READ` desc +mariadb-version=110502 diff --git a/db/sys/x@0024session.frm b/db/sys/x@0024session.frm new file mode 100755 index 0000000..d117970 --- /dev/null +++ b/db/sys/x@0024session.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `x$processlist`.`thd_id` AS `thd_id`,`x$processlist`.`conn_id` AS `conn_id`,`x$processlist`.`user` AS `user`,`x$processlist`.`db` AS `db`,`x$processlist`.`command` AS `command`,`x$processlist`.`state` AS `state`,`x$processlist`.`time` AS `time`,`x$processlist`.`current_statement` AS `current_statement`,`x$processlist`.`statement_latency` AS `statement_latency`,`x$processlist`.`progress` AS `progress`,`x$processlist`.`lock_latency` AS `lock_latency`,`x$processlist`.`rows_examined` AS `rows_examined`,`x$processlist`.`rows_sent` AS `rows_sent`,`x$processlist`.`rows_affected` AS `rows_affected`,`x$processlist`.`tmp_tables` AS `tmp_tables`,`x$processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`x$processlist`.`full_scan` AS `full_scan`,`x$processlist`.`last_statement` AS `last_statement`,`x$processlist`.`last_statement_latency` AS `last_statement_latency`,`x$processlist`.`current_memory` AS `current_memory`,`x$processlist`.`last_wait` AS `last_wait`,`x$processlist`.`last_wait_latency` AS `last_wait_latency`,`x$processlist`.`source` AS `source`,`x$processlist`.`trx_latency` AS `trx_latency`,`x$processlist`.`trx_state` AS `trx_state`,`x$processlist`.`trx_autocommit` AS `trx_autocommit`,`x$processlist`.`pid` AS `pid`,`x$processlist`.`program_name` AS `program_name` from `sys`.`x$processlist` where `x$processlist`.`conn_id` is not null and `x$processlist`.`command` <> \'Daemon\' +md5=20277a58098b6112ed36c5879dbb6c33 +updatable=0 +algorithm=0 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140200755 +create-version=2 +source=SELECT * FROM sys.x$processlist\nWHERE conn_id IS NOT NULL AND command != \'Daemon\'; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `x$processlist`.`thd_id` AS `thd_id`,`x$processlist`.`conn_id` AS `conn_id`,`x$processlist`.`user` AS `user`,`x$processlist`.`db` AS `db`,`x$processlist`.`command` AS `command`,`x$processlist`.`state` AS `state`,`x$processlist`.`time` AS `time`,`x$processlist`.`current_statement` AS `current_statement`,`x$processlist`.`statement_latency` AS `statement_latency`,`x$processlist`.`progress` AS `progress`,`x$processlist`.`lock_latency` AS `lock_latency`,`x$processlist`.`rows_examined` AS `rows_examined`,`x$processlist`.`rows_sent` AS `rows_sent`,`x$processlist`.`rows_affected` AS `rows_affected`,`x$processlist`.`tmp_tables` AS `tmp_tables`,`x$processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`x$processlist`.`full_scan` AS `full_scan`,`x$processlist`.`last_statement` AS `last_statement`,`x$processlist`.`last_statement_latency` AS `last_statement_latency`,`x$processlist`.`current_memory` AS `current_memory`,`x$processlist`.`last_wait` AS `last_wait`,`x$processlist`.`last_wait_latency` AS `last_wait_latency`,`x$processlist`.`source` AS `source`,`x$processlist`.`trx_latency` AS `trx_latency`,`x$processlist`.`trx_state` AS `trx_state`,`x$processlist`.`trx_autocommit` AS `trx_autocommit`,`x$processlist`.`pid` AS `pid`,`x$processlist`.`program_name` AS `program_name` from `sys`.`x$processlist` where `x$processlist`.`conn_id` is not null and `x$processlist`.`command` <> \'Daemon\' +mariadb-version=110502 diff --git a/db/sys/x@0024statement_analysis.frm b/db/sys/x@0024statement_analysis.frm new file mode 100755 index 0000000..895f652 --- /dev/null +++ b/db/sys/x@0024statement_analysis.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +md5=c4d19fab63f1a07088959a488e8921e5 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139824920 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME AS db,\n IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, \'*\', \'\') AS full_scan,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS err_count,\n SUM_WARNINGS AS warn_count,\n SUM_TIMER_WAIT AS total_latency,\n MAX_TIMER_WAIT AS max_latency,\n AVG_TIMER_WAIT AS avg_latency,\n SUM_LOCK_TIME AS lock_latency,\n SUM_ROWS_SENT AS rows_sent,\n ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg,\n SUM_ROWS_AFFECTED AS rows_affected,\n ROUND(IFNULL(SUM_ROWS_AFFECTED / NULLIF(COUNT_STAR, 0), 0)) AS rows_affected_avg,\n SUM_CREATED_TMP_TABLES AS tmp_tables,\n SUM_CREATED_TMP_DISK_TABLES AS tmp_disk_tables,\n SUM_SORT_ROWS AS rows_sorted,\n SUM_SORT_MERGE_PASSES AS sort_merge_passes,\n DIGEST AS digest,\n FIRST_SEEN AS first_seen,\n LAST_SEEN as last_seen\n FROM performance_schema.events_statements_summary_by_digest\nORDER BY SUM_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,if(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `err_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warn_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` AS `rows_affected`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_AFFECTED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `rows_affected_avg`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen` from `performance_schema`.`events_statements_summary_by_digest` order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024statements_with_errors_or_warnings.frm b/db/sys/x@0024statements_with_errors_or_warnings.frm new file mode 100755 index 0000000..3f393b9 --- /dev/null +++ b/db/sys/x@0024statements_with_errors_or_warnings.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc +md5=490874cb895cee05cc7f8d813cd41ae8 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139837513 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS errors,\n IFNULL(SUM_ERRORS / NULLIF(COUNT_STAR, 0), 0) * 100 as error_pct,\n SUM_WARNINGS AS warnings,\n IFNULL(SUM_WARNINGS / NULLIF(COUNT_STAR, 0), 0) * 100 as warning_pct,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_ERRORS > 0\n OR SUM_WARNINGS > 0\nORDER BY SUM_ERRORS DESC, SUM_WARNINGS DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100 AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc +mariadb-version=110502 diff --git a/db/sys/x@0024statements_with_full_table_scans.frm b/db/sys/x@0024statements_with_full_table_scans.frm new file mode 100755 index 0000000..2ca7ed4 --- /dev/null +++ b/db/sys/x@0024statements_with_full_table_scans.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_sent_avg`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) and `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` not like \'SHOW%\' order by round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +md5=25b42c369cee614420db6a77c1fc10c6 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139852983 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n SUM_TIMER_WAIT AS total_latency,\n SUM_NO_INDEX_USED AS no_index_used_count,\n SUM_NO_GOOD_INDEX_USED AS no_good_index_used_count,\n ROUND(IFNULL(SUM_NO_INDEX_USED / NULLIF(COUNT_STAR, 0), 0) * 100) AS no_index_used_pct,\n SUM_ROWS_SENT AS rows_sent,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(SUM_ROWS_SENT/COUNT_STAR) AS rows_sent_avg,\n ROUND(SUM_ROWS_EXAMINED/COUNT_STAR) AS rows_examined_avg,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE (SUM_NO_INDEX_USED > 0\n OR SUM_NO_GOOD_INDEX_USED > 0)\n AND DIGEST_TEXT NOT LIKE \'SHOW%\'\n ORDER BY no_index_used_pct DESC, total_latency DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` AS `no_index_used_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` AS `no_good_index_used_count`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) AS `no_index_used_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_SENT` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_sent_avg`,round(`performance_schema`.`events_statements_summary_by_digest`.`SUM_ROWS_EXAMINED` / `performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0) AS `rows_examined_avg`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where (`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` > 0 or `performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_GOOD_INDEX_USED` > 0) and `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` not like \'SHOW%\' order by round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_NO_INDEX_USED` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0) * 100,0) desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024statements_with_runtimes_in_95th_percentile.frm b/db/sys/x@0024statements_with_runtimes_in_95th_percentile.frm new file mode 100755 index 0000000..302a5bd --- /dev/null +++ b/db/sys/x@0024statements_with_runtimes_in_95th_percentile.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `stmts`.`DIGEST_TEXT` AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0 or `stmts`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`stmts`.`SUM_TIMER_WAIT` AS `total_latency`,`stmts`.`MAX_TIMER_WAIT` AS `max_latency`,`stmts`.`AVG_TIMER_WAIT` AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on(round(`stmts`.`AVG_TIMER_WAIT` / 1000000,0) >= `top_percentile`.`avg_us`)) order by `stmts`.`AVG_TIMER_WAIT` desc +md5=8cd6ce405be77ab4980ea412c943b553 +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139882915 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME AS db,\n IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, \'*\', \'\') AS full_scan,\n COUNT_STAR AS exec_count,\n SUM_ERRORS AS err_count,\n SUM_WARNINGS AS warn_count,\n SUM_TIMER_WAIT AS total_latency,\n MAX_TIMER_WAIT AS max_latency,\n AVG_TIMER_WAIT AS avg_latency,\n SUM_ROWS_SENT AS rows_sent,\n ROUND(IFNULL(SUM_ROWS_SENT / NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg,\n SUM_ROWS_EXAMINED AS rows_examined,\n ROUND(IFNULL(SUM_ROWS_EXAMINED / NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest stmts\n JOIN sys.x$ps_digest_95th_percentile_by_avg_us AS top_percentile\n ON ROUND(stmts.avg_timer_wait/1000000) >= top_percentile.avg_us\n ORDER BY AVG_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `stmts`.`DIGEST_TEXT` AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0 or `stmts`.`SUM_NO_INDEX_USED` > 0,\'*\',\'\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`stmts`.`SUM_TIMER_WAIT` AS `total_latency`,`stmts`.`MAX_TIMER_WAIT` AS `max_latency`,`stmts`.`AVG_TIMER_WAIT` AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull(`stmts`.`SUM_ROWS_SENT` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull(`stmts`.`SUM_ROWS_EXAMINED` / nullif(`stmts`.`COUNT_STAR`,0),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on(round(`stmts`.`AVG_TIMER_WAIT` / 1000000,0) >= `top_percentile`.`avg_us`)) order by `stmts`.`AVG_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024statements_with_sorting.frm b/db/sys/x@0024statements_with_sorting.frm new file mode 100755 index 0000000..d8d8a3c --- /dev/null +++ b/db/sys/x@0024statements_with_sorting.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +md5=8b01a28d1860db00b058ebea2c26a640 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139898944 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME db,\n COUNT_STAR AS exec_count,\n SUM_TIMER_WAIT AS total_latency,\n SUM_SORT_MERGE_PASSES AS sort_merge_passes,\n ROUND(IFNULL(SUM_SORT_MERGE_PASSES / NULLIF(COUNT_STAR, 0), 0)) AS avg_sort_merges,\n SUM_SORT_SCAN AS sorts_using_scans,\n SUM_SORT_RANGE AS sort_using_range,\n SUM_SORT_ROWS AS rows_sorted,\n ROUND(IFNULL(SUM_SORT_ROWS / NULLIF(COUNT_STAR, 0), 0)) AS avg_rows_sorted,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_SORT_ROWS > 0\n ORDER BY SUM_TIMER_WAIT DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` AS `sort_merge_passes`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_MERGE_PASSES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_sort_merges`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_SCAN` AS `sorts_using_scans`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_RANGE` AS `sort_using_range`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` AS `rows_sorted`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_rows_sorted`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_SORT_ROWS` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024statements_with_temp_tables.frm b/db/sys/x@0024statements_with_temp_tables.frm new file mode 100755 index 0000000..2f87d3a --- /dev/null +++ b/db/sys/x@0024statements_with_temp_tables.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_tmp_tables_per_query`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0),0) * 100,0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc +md5=f5cd01b57e735775d233ed9f8cb24232 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139914386 +create-version=2 +source=SELECT DIGEST_TEXT AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n SUM_TIMER_WAIT as total_latency,\n SUM_CREATED_TMP_TABLES AS memory_tmp_tables,\n SUM_CREATED_TMP_DISK_TABLES AS disk_tmp_tables,\n ROUND(IFNULL(SUM_CREATED_TMP_TABLES / NULLIF(COUNT_STAR, 0), 0)) AS avg_tmp_tables_per_query,\n ROUND(IFNULL(SUM_CREATED_TMP_DISK_TABLES / NULLIF(SUM_CREATED_TMP_TABLES, 0), 0) * 100) AS tmp_tables_to_disk_pct,\n FIRST_SEEN as first_seen,\n LAST_SEEN as last_seen,\n DIGEST AS digest\n FROM performance_schema.events_statements_summary_by_digest\n WHERE SUM_CREATED_TMP_TABLES > 0\nORDER BY SUM_CREATED_TMP_DISK_TABLES DESC, SUM_CREATED_TMP_TABLES DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` AS `memory_tmp_tables`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` AS `disk_tmp_tables`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0),0),0) AS `avg_tmp_tables_per_query`,round(ifnull(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` / nullif(`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES`,0),0) * 100,0) AS `tmp_tables_to_disk_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` > 0 order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_DISK_TABLES` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_CREATED_TMP_TABLES` desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary.frm b/db/sys/x@0024user_summary.frm new file mode 100755 index 0000000..bd5b6fc --- /dev/null +++ b/db/sys/x@0024user_summary.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,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`,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`.`HOST`) AS `unique_hosts`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`)) left join `sys`.`x$user_summary_by_file_io` `io` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `io`.`user`)) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `mem`.`user`)) group by if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc +md5=82e3b4c9bcfc7fb791db32600a9deaed +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140004606 +create-version=2 +source=SELECT IF(accounts.user IS NULL, \'background\', accounts.user) AS user,\n SUM(stmt.total) AS statements,\n SUM(stmt.total_latency) AS statement_latency,\n IFNULL(SUM(stmt.total_latency) / NULLIF(SUM(stmt.total), 0), 0) AS statement_avg_latency,\n SUM(stmt.full_scans) AS table_scans,\n SUM(io.ios) AS file_ios,\n SUM(io.io_latency) AS file_io_latency,\n SUM(accounts.current_connections) AS current_connections,\n SUM(accounts.total_connections) AS total_connections,\n COUNT(DISTINCT host) AS unique_hosts,\n SUM(mem.current_allocated) AS current_memory,\n SUM(mem.total_allocated) AS total_memory_allocated\n FROM performance_schema.accounts\n LEFT JOIN sys.x$user_summary_by_statement_latency AS stmt ON IF(accounts.user IS NULL, \'background\', accounts.user) = stmt.user\n LEFT JOIN sys.x$user_summary_by_file_io AS io ON IF(accounts.user IS NULL, \'background\', accounts.user) = io.user\n LEFT JOIN sys.x$memory_by_user_by_current_bytes mem ON IF(accounts.user IS NULL, \'background\', accounts.user) = mem.user\n GROUP BY IF(accounts.user IS NULL, \'background\', accounts.user)\n ORDER BY SUM(stmt.total_latency) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) AS `user`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,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`,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`.`HOST`) AS `unique_hosts`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` left join `sys`.`x$user_summary_by_statement_latency` `stmt` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `stmt`.`user`)) left join `sys`.`x$user_summary_by_file_io` `io` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `io`.`user`)) left join `sys`.`x$memory_by_user_by_current_bytes` `mem` on(if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) = `mem`.`user`)) group by if(`performance_schema`.`accounts`.`USER` is null,\'background\',`performance_schema`.`accounts`.`USER`) order by sum(`stmt`.`total_latency`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary_by_file_io.frm b/db/sys/x@0024user_summary_by_file_io.frm new file mode 100755 index 0000000..ccc96d9 --- /dev/null +++ b/db/sys/x@0024user_summary_by_file_io.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=6df37c787ef9fce933608c125a1387fb +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139942974 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS ios,\n SUM(sum_timer_wait) AS io_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name LIKE \'wait/io/file/%\'\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR`) AS `ios`,sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `io_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary_by_file_io_type.frm b/db/sys/x@0024user_summary_by_file_io_type.frm new file mode 100755 index 0000000..62fd9d0 --- /dev/null +++ b/db/sys/x@0024user_summary_by_file_io_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=090cb2483f78e6606559dbe59df50262 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139929348 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n sum_timer_wait AS latency,\n max_timer_wait AS max_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name LIKE \'wait/io/file%\'\n AND count_star > 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary_by_stages.frm b/db/sys/x@0024user_summary_by_stages.frm new file mode 100755 index 0000000..73de332 --- /dev/null +++ b/db/sys/x@0024user_summary_by_stages.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where `performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=fd4b252d26f75f39a2cc024c0274015f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139985256 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency\n FROM performance_schema.events_stages_summary_by_user_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where `performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary_by_statement_latency.frm b/db/sys/x@0024user_summary_by_statement_latency.frm new file mode 100755 index 0000000..a15c9ac --- /dev/null +++ b/db/sys/x@0024user_summary_by_statement_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=8a66e66ddf15b2e1bac716c31092459e +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139971157 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS total,\n SUM(sum_timer_wait) AS total_latency,\n SUM(max_timer_wait) AS max_latency,\n SUM(sum_lock_time) AS lock_latency,\n SUM(sum_rows_sent) AS rows_sent,\n SUM(sum_rows_examined) AS rows_examined,\n SUM(sum_rows_affected) AS rows_affected,\n SUM(sum_no_index_used) + SUM(sum_no_good_index_used) AS full_scans\n FROM performance_schema.events_statements_summary_by_user_by_event_name\n GROUP BY IF(user IS NULL, \'background\', user)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME`) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` group by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) order by sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024user_summary_by_statement_type.frm b/db/sys/x@0024user_summary_by_statement_type.frm new file mode 100755 index 0000000..7c28934 --- /dev/null +++ b/db/sys/x@0024user_summary_by_statement_type.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED` AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=ccc4b90f7417d82d85b9dc522b56d654 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324139958324 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUBSTRING_INDEX(event_name, \'/\', -1) AS statement,\n count_star AS total,\n sum_timer_wait AS total_latency,\n max_timer_wait AS max_latency,\n sum_lock_time AS lock_latency,\n sum_rows_sent AS rows_sent,\n sum_rows_examined AS rows_examined,\n sum_rows_affected AS rows_affected,\n sum_no_index_used + sum_no_good_index_used AS full_scans\n FROM performance_schema.events_statements_summary_by_user_by_event_name\n WHERE sum_timer_wait != 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`) AS `user`,substring_index(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`EVENT_NAME`,\'/\',-1) AS `statement`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_LOCK_TIME` AS `lock_latency`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_SENT` AS `rows_sent`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_EXAMINED` AS `rows_examined`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_ROWS_AFFECTED` AS `rows_affected`,`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_INDEX_USED` + `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_NO_GOOD_INDEX_USED` AS `full_scans` from `performance_schema`.`events_statements_summary_by_user_by_event_name` where `performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_statements_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024wait_classes_global_by_avg_latency.frm b/db/sys/x@0024wait_classes_global_by_avg_latency.frm new file mode 100755 index 0000000..cfae415 --- /dev/null +++ b/db/sys/x@0024wait_classes_global_by_avg_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) desc +md5=a2b68acb933f339797a5f792e65b55f3 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140101291 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n SUM(sum_timer_wait) AS total_latency,\n MIN(min_timer_wait) AS min_latency,\n IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0) AS avg_latency,\n MAX(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE sum_timer_wait > 0\n AND event_name != \'idle\'\n GROUP BY event_class\n ORDER BY IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) desc +mariadb-version=110502 diff --git a/db/sys/x@0024wait_classes_global_by_latency.frm b/db/sys/x@0024wait_classes_global_by_latency.frm new file mode 100755 index 0000000..0c17762 --- /dev/null +++ b/db/sys/x@0024wait_classes_global_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc +md5=b107bc5e0b1c409651fc3872b551fbd6 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140114246 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n SUM(sum_timer_wait) AS total_latency,\n MIN(min_timer_wait) AS min_latency,\n IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0) AS avg_latency,\n MAX(max_timer_wait) AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE sum_timer_wait > 0\n AND event_name != \'idle\'\n GROUP BY SUBSTRING_INDEX(event_name,\'/\', 3)\n ORDER BY SUM(sum_timer_wait) DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) / nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 and `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\'/\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc +mariadb-version=110502 diff --git a/db/sys/x@0024waits_by_host_by_latency.frm b/db/sys/x@0024waits_by_host_by_latency.frm new file mode 100755 index 0000000..df9667d --- /dev/null +++ b/db/sys/x@0024waits_by_host_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`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` <> \'idle\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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=6db496ac0e3e32dd8e3ca80c584f8ccd +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140139018 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name AS event,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency,\n max_timer_wait AS max_latency\n FROM performance_schema.events_waits_summary_by_host_by_event_name\n WHERE event_name != \'idle\'\n AND sum_timer_wait > 0\n ORDER BY host, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`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` <> \'idle\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST` is null,\'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 +mariadb-version=110502 diff --git a/db/sys/x@0024waits_by_user_by_latency.frm b/db/sys/x@0024waits_by_user_by_latency.frm new file mode 100755 index 0000000..7af4957 --- /dev/null +++ b/db/sys/x@0024waits_by_user_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +md5=c1f2d1207467817a5938ea4cd03c4e55 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140126882 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name AS event,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency,\n max_timer_wait AS max_latency\n FROM performance_schema.events_waits_summary_by_user_by_event_name\n WHERE event_name != \'idle\'\n AND user IS NOT NULL\n AND sum_timer_wait > 0\n ORDER BY user, sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` AS `event`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_by_user_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_user_by_event_name` where `performance_schema`.`events_waits_summary_by_user_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is not null and `performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` > 0 order by if(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER` is null,\'background\',`performance_schema`.`events_waits_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/sys/x@0024waits_global_by_latency.frm b/db/sys/x@0024waits_global_by_latency.frm new file mode 100755 index 0000000..f2e5561 --- /dev/null +++ b/db/sys/x@0024waits_global_by_latency.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc +md5=63c324ddff171469768e3ef704df8c1e +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001724324140151967 +create-version=2 +source=SELECT event_name AS event,\n count_star AS total,\n sum_timer_wait AS total_latency,\n avg_timer_wait AS avg_latency,\n max_timer_wait AS max_latency\n FROM performance_schema.events_waits_summary_global_by_event_name\n WHERE event_name != \'idle\'\n AND sum_timer_wait > 0\n ORDER BY sum_timer_wait DESC; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \'idle\' and `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0 order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc +mariadb-version=110502 diff --git a/db/tc.log b/db/tc.log new file mode 100755 index 0000000..cc8a34a Binary files /dev/null and b/db/tc.log differ diff --git a/db/undo001 b/db/undo001 new file mode 100755 index 0000000..3617f3c Binary files /dev/null and b/db/undo001 differ diff --git a/db/undo002 b/db/undo002 new file mode 100755 index 0000000..987e98d Binary files /dev/null and b/db/undo002 differ diff --git a/db/undo003 b/db/undo003 new file mode 100755 index 0000000..2c7e172 Binary files /dev/null and b/db/undo003 differ diff --git a/db/world/city.frm b/db/world/city.frm new file mode 100755 index 0000000..e54f646 Binary files /dev/null and b/db/world/city.frm differ diff --git a/db/world/city.ibd b/db/world/city.ibd new file mode 100755 index 0000000..7c6ef0f Binary files /dev/null and b/db/world/city.ibd differ diff --git a/db/world/country.frm b/db/world/country.frm new file mode 100755 index 0000000..b6fce72 Binary files /dev/null and b/db/world/country.frm differ diff --git a/db/world/country.ibd b/db/world/country.ibd new file mode 100755 index 0000000..03baade Binary files /dev/null and b/db/world/country.ibd differ diff --git a/db/world/countrylanguage.frm b/db/world/countrylanguage.frm new file mode 100755 index 0000000..cbfd742 Binary files /dev/null and b/db/world/countrylanguage.frm differ diff --git a/db/world/countrylanguage.ibd b/db/world/countrylanguage.ibd new file mode 100755 index 0000000..e8d410f Binary files /dev/null and b/db/world/countrylanguage.ibd differ diff --git a/db/world/db.opt b/db/world/db.opt new file mode 100755 index 0000000..22bfbdb --- /dev/null +++ b/db/world/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_uca1400_ai_ci