diff --git a/docker/admintool/.env b/docker/admintool/.env new file mode 100644 index 0000000..c6c9fe0 --- /dev/null +++ b/docker/admintool/.env @@ -0,0 +1,6 @@ +MYSQL_HOST=localhost +MYSQL_PORT=3306 +MYSQL_ROOT_PASSWORD=root! +MYSQL_DATABASE=user_stat +MYSQL_USER=khlee103 +MYSQL_PASSWORD=123 \ No newline at end of file diff --git a/docker/admintool/db/conf.d/my.cnf b/docker/admintool/db/conf.d/my.cnf new file mode 100644 index 0000000..1d3ea85 --- /dev/null +++ b/docker/admintool/db/conf.d/my.cnf @@ -0,0 +1,10 @@ +[client] +default-character-set = utf8mb4 + +[mysql] +default-character-set = utf8mb4 + +[mysqld] +character-set-client-handshake = FALSE +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci \ No newline at end of file diff --git a/docker/admintool/db/data/.my-healthcheck.cnf b/docker/admintool/db/data/.my-healthcheck.cnf new file mode 100644 index 0000000..b3f4b54 --- /dev/null +++ b/docker/admintool/db/data/.my-healthcheck.cnf @@ -0,0 +1,7 @@ +[mariadb-client] +port=3306 +socket=/run/mysqld/mysqld.sock +user=healthcheck +password=lTU(,&jON-c|dRO8xCxZrW6/Y1b/Vdh" +protocol=tcp + diff --git a/docker/admintool/db/data/aria_log.00000001 b/docker/admintool/db/data/aria_log.00000001 new file mode 100644 index 0000000..c4eba7e Binary files /dev/null and b/docker/admintool/db/data/aria_log.00000001 differ diff --git a/docker/admintool/db/data/aria_log_control b/docker/admintool/db/data/aria_log_control new file mode 100644 index 0000000..bc160e4 Binary files /dev/null and b/docker/admintool/db/data/aria_log_control differ diff --git a/docker/admintool/db/data/caliverse/admin.frm b/docker/admintool/db/data/caliverse/admin.frm new file mode 100644 index 0000000..3a2192c Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin.frm differ diff --git a/docker/admintool/db/data/caliverse/admin.ibd b/docker/admintool/db/data/caliverse/admin.ibd new file mode 100644 index 0000000..e9c354b Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin.ibd differ diff --git a/docker/admintool/db/data/caliverse/admin_history.frm b/docker/admintool/db/data/caliverse/admin_history.frm new file mode 100644 index 0000000..ea78846 Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin_history.frm differ diff --git a/docker/admintool/db/data/caliverse/admin_history.ibd b/docker/admintool/db/data/caliverse/admin_history.ibd new file mode 100644 index 0000000..c9d399a Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin_history.ibd differ diff --git a/docker/admintool/db/data/caliverse/admin_log.frm b/docker/admintool/db/data/caliverse/admin_log.frm new file mode 100644 index 0000000..37d7743 Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin_log.frm differ diff --git a/docker/admintool/db/data/caliverse/admin_log.ibd b/docker/admintool/db/data/caliverse/admin_log.ibd new file mode 100644 index 0000000..37dd9cd Binary files /dev/null and b/docker/admintool/db/data/caliverse/admin_log.ibd differ diff --git a/docker/admintool/db/data/caliverse/authority.frm b/docker/admintool/db/data/caliverse/authority.frm new file mode 100644 index 0000000..36aeafc Binary files /dev/null and b/docker/admintool/db/data/caliverse/authority.frm differ diff --git a/docker/admintool/db/data/caliverse/authority.ibd b/docker/admintool/db/data/caliverse/authority.ibd new file mode 100644 index 0000000..28a0b6c Binary files /dev/null and b/docker/admintool/db/data/caliverse/authority.ibd differ diff --git a/docker/admintool/db/data/caliverse/black_list.frm b/docker/admintool/db/data/caliverse/black_list.frm new file mode 100644 index 0000000..9e508c3 Binary files /dev/null and b/docker/admintool/db/data/caliverse/black_list.frm differ diff --git a/docker/admintool/db/data/caliverse/black_list.ibd b/docker/admintool/db/data/caliverse/black_list.ibd new file mode 100644 index 0000000..74f801a Binary files /dev/null and b/docker/admintool/db/data/caliverse/black_list.ibd differ diff --git a/docker/admintool/db/data/caliverse/caliverse_meta_data.frm b/docker/admintool/db/data/caliverse/caliverse_meta_data.frm new file mode 100644 index 0000000..5f3cad6 Binary files /dev/null and b/docker/admintool/db/data/caliverse/caliverse_meta_data.frm differ diff --git a/docker/admintool/db/data/caliverse/caliverse_meta_data.ibd b/docker/admintool/db/data/caliverse/caliverse_meta_data.ibd new file mode 100644 index 0000000..6d3ac70 Binary files /dev/null and b/docker/admintool/db/data/caliverse/caliverse_meta_data.ibd differ diff --git a/docker/admintool/db/data/caliverse/db.opt b/docker/admintool/db/data/caliverse/db.opt new file mode 100644 index 0000000..112cf52 --- /dev/null +++ b/docker/admintool/db/data/caliverse/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_bin diff --git a/docker/admintool/db/data/caliverse/event.frm b/docker/admintool/db/data/caliverse/event.frm new file mode 100644 index 0000000..c479e63 Binary files /dev/null and b/docker/admintool/db/data/caliverse/event.frm differ diff --git a/docker/admintool/db/data/caliverse/event.ibd b/docker/admintool/db/data/caliverse/event.ibd new file mode 100644 index 0000000..9defd1a Binary files /dev/null and b/docker/admintool/db/data/caliverse/event.ibd differ diff --git a/docker/admintool/db/data/caliverse/group_auth.frm b/docker/admintool/db/data/caliverse/group_auth.frm new file mode 100644 index 0000000..6d4258c Binary files /dev/null and b/docker/admintool/db/data/caliverse/group_auth.frm differ diff --git a/docker/admintool/db/data/caliverse/group_auth.ibd b/docker/admintool/db/data/caliverse/group_auth.ibd new file mode 100644 index 0000000..ece12b7 Binary files /dev/null and b/docker/admintool/db/data/caliverse/group_auth.ibd differ diff --git a/docker/admintool/db/data/caliverse/groups.frm b/docker/admintool/db/data/caliverse/groups.frm new file mode 100644 index 0000000..6991bab Binary files /dev/null and b/docker/admintool/db/data/caliverse/groups.frm differ diff --git a/docker/admintool/db/data/caliverse/groups.ibd b/docker/admintool/db/data/caliverse/groups.ibd new file mode 100644 index 0000000..294daf2 Binary files /dev/null and b/docker/admintool/db/data/caliverse/groups.ibd differ diff --git a/docker/admintool/db/data/caliverse/item.frm b/docker/admintool/db/data/caliverse/item.frm new file mode 100644 index 0000000..4c24a9d Binary files /dev/null and b/docker/admintool/db/data/caliverse/item.frm differ diff --git a/docker/admintool/db/data/caliverse/item.ibd b/docker/admintool/db/data/caliverse/item.ibd new file mode 100644 index 0000000..d92a29b Binary files /dev/null and b/docker/admintool/db/data/caliverse/item.ibd differ diff --git a/docker/admintool/db/data/caliverse/mail.frm b/docker/admintool/db/data/caliverse/mail.frm new file mode 100644 index 0000000..993ab89 Binary files /dev/null and b/docker/admintool/db/data/caliverse/mail.frm differ diff --git a/docker/admintool/db/data/caliverse/mail.ibd b/docker/admintool/db/data/caliverse/mail.ibd new file mode 100644 index 0000000..c080aa1 Binary files /dev/null and b/docker/admintool/db/data/caliverse/mail.ibd differ diff --git a/docker/admintool/db/data/caliverse/message.frm b/docker/admintool/db/data/caliverse/message.frm new file mode 100644 index 0000000..66efae7 Binary files /dev/null and b/docker/admintool/db/data/caliverse/message.frm differ diff --git a/docker/admintool/db/data/caliverse/message.ibd b/docker/admintool/db/data/caliverse/message.ibd new file mode 100644 index 0000000..5494abf Binary files /dev/null and b/docker/admintool/db/data/caliverse/message.ibd differ diff --git a/docker/admintool/db/data/caliverse/notice.frm b/docker/admintool/db/data/caliverse/notice.frm new file mode 100644 index 0000000..742dfa3 Binary files /dev/null and b/docker/admintool/db/data/caliverse/notice.frm differ diff --git a/docker/admintool/db/data/caliverse/notice.ibd b/docker/admintool/db/data/caliverse/notice.ibd new file mode 100644 index 0000000..28df7c2 Binary files /dev/null and b/docker/admintool/db/data/caliverse/notice.ibd differ diff --git a/docker/admintool/db/data/caliverse/token.frm b/docker/admintool/db/data/caliverse/token.frm new file mode 100644 index 0000000..5b4d5f7 Binary files /dev/null and b/docker/admintool/db/data/caliverse/token.frm differ diff --git a/docker/admintool/db/data/caliverse/token.ibd b/docker/admintool/db/data/caliverse/token.ibd new file mode 100644 index 0000000..bb5e602 Binary files /dev/null and b/docker/admintool/db/data/caliverse/token.ibd differ diff --git a/docker/admintool/db/data/caliverse/white_list.frm b/docker/admintool/db/data/caliverse/white_list.frm new file mode 100644 index 0000000..76d3c46 Binary files /dev/null and b/docker/admintool/db/data/caliverse/white_list.frm differ diff --git a/docker/admintool/db/data/caliverse/white_list.ibd b/docker/admintool/db/data/caliverse/white_list.ibd new file mode 100644 index 0000000..73a6690 Binary files /dev/null and b/docker/admintool/db/data/caliverse/white_list.ibd differ diff --git a/docker/admintool/db/data/caliverse_stat/db.opt b/docker/admintool/db/data/caliverse_stat/db.opt new file mode 100644 index 0000000..ccbf699 --- /dev/null +++ b/docker/admintool/db/data/caliverse_stat/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_general_ci diff --git a/docker/admintool/db/data/ddl_recovery-backup.log b/docker/admintool/db/data/ddl_recovery-backup.log new file mode 100644 index 0000000..5e30b6d Binary files /dev/null and b/docker/admintool/db/data/ddl_recovery-backup.log differ diff --git a/docker/admintool/db/data/ddl_recovery.log b/docker/admintool/db/data/ddl_recovery.log new file mode 100644 index 0000000..5b15c9c Binary files /dev/null and b/docker/admintool/db/data/ddl_recovery.log differ diff --git a/docker/admintool/db/data/ib_buffer_pool b/docker/admintool/db/data/ib_buffer_pool new file mode 100644 index 0000000..1103f65 --- /dev/null +++ b/docker/admintool/db/data/ib_buffer_pool @@ -0,0 +1,237 @@ +18,3 +18,2 +18,1 +18,0 +17,5 +12,2 +12,1 +12,0 +11,3 +11,2 +11,1 +11,0 +10,3 +10,2 +10,1 +10,0 +8,2 +8,1 +8,0 +7,5 +6,4 +6,3 +6,2 +6,1 +6,0 +5,2 +5,1 +5,0 +4,3 +17,1 +15,1 +14,1 +7,1 +28,4 +28,3 +28,2 +28,1 +27,3 +27,2 +27,1 +25,3 +25,2 +25,1 +23,3 +23,2 +23,1 +17,7 +17,6 +17,4 +17,3 +17,2 +17,0 +15,5 +15,4 +15,3 +15,2 +15,0 +14,4 +14,3 +14,2 +14,0 +12,5 +12,4 +12,3 +8,3 +7,14 +7,13 +7,12 +7,11 +7,10 +7,9 +7,8 +7,7 +7,6 +7,4 +7,3 +7,2 +7,0 +5,4 +5,3 +2,3 +1,3 +0,243 +0,9 +0,1 +0,300 +0,307 +0,299 +0,298 +0,301 +0,297 +0,296 +0,295 +0,294 +0,293 +0,292 +0,291 +0,290 +0,289 +0,288 +0,287 +0,286 +0,285 +0,284 +0,283 +0,282 +0,281 +0,280 +0,279 +0,278 +0,277 +0,276 +0,275 +0,274 +0,273 +0,272 +0,271 +0,270 +0,269 +0,268 +0,267 +0,266 +0,265 +0,264 +0,263 +0,262 +0,261 +0,260 +0,259 +0,258 +0,257 +0,256 +0,255 +0,254 +0,253 +0,252 +0,251 +0,250 +0,249 +0,248 +0,247 +0,246 +0,245 +0,244 +0,242 +0,241 +0,240 +0,239 +0,238 +0,237 +0,236 +0,235 +0,234 +0,315 +0,233 +0,309 +0,232 +0,231 +0,230 +0,229 +0,228 +0,308 +0,227 +0,226 +0,225 +0,224 +0,223 +0,222 +0,221 +0,220 +0,219 +0,218 +0,217 +0,216 +0,215 +0,214 +0,213 +0,212 +0,211 +0,210 +0,209 +0,208 +0,207 +0,206 +0,205 +0,204 +0,203 +0,202 +0,201 +0,200 +0,199 +0,198 +0,197 +0,196 +0,195 +0,194 +0,193 +0,192 +0,63 +0,62 +0,61 +0,60 +0,59 +0,58 +0,57 +0,56 +0,55 +0,54 +0,53 +0,52 +0,51 +0,50 +0,49 +0,48 +0,47 +0,46 +0,45 +0,6 +0,0 +0,5 +0,304 +0,303 +0,306 +0,305 +0,302 +0,12 +0,10 +0,8 +0,11 +0,4 +0,2 +0,3 +0,7 +28,0 +27,0 +25,0 +23,0 diff --git a/docker/admintool/db/data/ib_logfile0 b/docker/admintool/db/data/ib_logfile0 new file mode 100644 index 0000000..f6c0857 Binary files /dev/null and b/docker/admintool/db/data/ib_logfile0 differ diff --git a/docker/admintool/db/data/ibdata1 b/docker/admintool/db/data/ibdata1 new file mode 100644 index 0000000..677fca1 Binary files /dev/null and b/docker/admintool/db/data/ibdata1 differ diff --git a/docker/admintool/db/data/ibtmp1 b/docker/admintool/db/data/ibtmp1 new file mode 100644 index 0000000..202d95c Binary files /dev/null and b/docker/admintool/db/data/ibtmp1 differ diff --git a/docker/admintool/db/data/multi-master.info b/docker/admintool/db/data/multi-master.info new file mode 100644 index 0000000..e69de29 diff --git a/docker/admintool/db/data/mysql/column_stats.MAD b/docker/admintool/db/data/mysql/column_stats.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/column_stats.MAD differ diff --git a/docker/admintool/db/data/mysql/column_stats.MAI b/docker/admintool/db/data/mysql/column_stats.MAI new file mode 100644 index 0000000..5c25830 Binary files /dev/null and b/docker/admintool/db/data/mysql/column_stats.MAI differ diff --git a/docker/admintool/db/data/mysql/column_stats.frm b/docker/admintool/db/data/mysql/column_stats.frm new file mode 100644 index 0000000..3b9b571 Binary files /dev/null and b/docker/admintool/db/data/mysql/column_stats.frm differ diff --git a/docker/admintool/db/data/mysql/columns_priv.MAD b/docker/admintool/db/data/mysql/columns_priv.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/columns_priv.MAD differ diff --git a/docker/admintool/db/data/mysql/columns_priv.MAI b/docker/admintool/db/data/mysql/columns_priv.MAI new file mode 100644 index 0000000..36665a2 Binary files /dev/null and b/docker/admintool/db/data/mysql/columns_priv.MAI differ diff --git a/docker/admintool/db/data/mysql/columns_priv.frm b/docker/admintool/db/data/mysql/columns_priv.frm new file mode 100644 index 0000000..d581fc6 Binary files /dev/null and b/docker/admintool/db/data/mysql/columns_priv.frm differ diff --git a/docker/admintool/db/data/mysql/db.MAD b/docker/admintool/db/data/mysql/db.MAD new file mode 100644 index 0000000..497b7df Binary files /dev/null and b/docker/admintool/db/data/mysql/db.MAD differ diff --git a/docker/admintool/db/data/mysql/db.MAI b/docker/admintool/db/data/mysql/db.MAI new file mode 100644 index 0000000..a3d1586 Binary files /dev/null and b/docker/admintool/db/data/mysql/db.MAI differ diff --git a/docker/admintool/db/data/mysql/db.frm b/docker/admintool/db/data/mysql/db.frm new file mode 100644 index 0000000..e7b1ddf Binary files /dev/null and b/docker/admintool/db/data/mysql/db.frm differ diff --git a/docker/admintool/db/data/mysql/db.opt b/docker/admintool/db/data/mysql/db.opt new file mode 100644 index 0000000..ccbf699 --- /dev/null +++ b/docker/admintool/db/data/mysql/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_general_ci diff --git a/docker/admintool/db/data/mysql/event.MAD b/docker/admintool/db/data/mysql/event.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/event.MAD differ diff --git a/docker/admintool/db/data/mysql/event.MAI b/docker/admintool/db/data/mysql/event.MAI new file mode 100644 index 0000000..3665668 Binary files /dev/null and b/docker/admintool/db/data/mysql/event.MAI differ diff --git a/docker/admintool/db/data/mysql/event.frm b/docker/admintool/db/data/mysql/event.frm new file mode 100644 index 0000000..405f765 Binary files /dev/null and b/docker/admintool/db/data/mysql/event.frm differ diff --git a/docker/admintool/db/data/mysql/func.MAD b/docker/admintool/db/data/mysql/func.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/func.MAD differ diff --git a/docker/admintool/db/data/mysql/func.MAI b/docker/admintool/db/data/mysql/func.MAI new file mode 100644 index 0000000..2317a21 Binary files /dev/null and b/docker/admintool/db/data/mysql/func.MAI differ diff --git a/docker/admintool/db/data/mysql/func.frm b/docker/admintool/db/data/mysql/func.frm new file mode 100644 index 0000000..fc09dec Binary files /dev/null and b/docker/admintool/db/data/mysql/func.frm differ diff --git a/docker/admintool/db/data/mysql/general_log.CSM b/docker/admintool/db/data/mysql/general_log.CSM new file mode 100644 index 0000000..8d08b8d Binary files /dev/null and b/docker/admintool/db/data/mysql/general_log.CSM differ diff --git a/docker/admintool/db/data/mysql/general_log.CSV b/docker/admintool/db/data/mysql/general_log.CSV new file mode 100644 index 0000000..e69de29 diff --git a/docker/admintool/db/data/mysql/general_log.frm b/docker/admintool/db/data/mysql/general_log.frm new file mode 100644 index 0000000..918bd37 Binary files /dev/null and b/docker/admintool/db/data/mysql/general_log.frm differ diff --git a/docker/admintool/db/data/mysql/global_priv.MAD b/docker/admintool/db/data/mysql/global_priv.MAD new file mode 100644 index 0000000..d14bcd4 Binary files /dev/null and b/docker/admintool/db/data/mysql/global_priv.MAD differ diff --git a/docker/admintool/db/data/mysql/global_priv.MAI b/docker/admintool/db/data/mysql/global_priv.MAI new file mode 100644 index 0000000..ef90227 Binary files /dev/null and b/docker/admintool/db/data/mysql/global_priv.MAI differ diff --git a/docker/admintool/db/data/mysql/global_priv.frm b/docker/admintool/db/data/mysql/global_priv.frm new file mode 100644 index 0000000..2acfe8c Binary files /dev/null and b/docker/admintool/db/data/mysql/global_priv.frm differ diff --git a/docker/admintool/db/data/mysql/gtid_slave_pos.frm b/docker/admintool/db/data/mysql/gtid_slave_pos.frm new file mode 100644 index 0000000..03209c1 Binary files /dev/null and b/docker/admintool/db/data/mysql/gtid_slave_pos.frm differ diff --git a/docker/admintool/db/data/mysql/gtid_slave_pos.ibd b/docker/admintool/db/data/mysql/gtid_slave_pos.ibd new file mode 100644 index 0000000..2058ed7 Binary files /dev/null and b/docker/admintool/db/data/mysql/gtid_slave_pos.ibd differ diff --git a/docker/admintool/db/data/mysql/help_category.MAD b/docker/admintool/db/data/mysql/help_category.MAD new file mode 100644 index 0000000..37faeac Binary files /dev/null and b/docker/admintool/db/data/mysql/help_category.MAD differ diff --git a/docker/admintool/db/data/mysql/help_category.MAI b/docker/admintool/db/data/mysql/help_category.MAI new file mode 100644 index 0000000..b9c651f Binary files /dev/null and b/docker/admintool/db/data/mysql/help_category.MAI differ diff --git a/docker/admintool/db/data/mysql/help_category.frm b/docker/admintool/db/data/mysql/help_category.frm new file mode 100644 index 0000000..ab2d6e2 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_category.frm differ diff --git a/docker/admintool/db/data/mysql/help_keyword.MAD b/docker/admintool/db/data/mysql/help_keyword.MAD new file mode 100644 index 0000000..796b299 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_keyword.MAD differ diff --git a/docker/admintool/db/data/mysql/help_keyword.MAI b/docker/admintool/db/data/mysql/help_keyword.MAI new file mode 100644 index 0000000..32d18c8 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_keyword.MAI differ diff --git a/docker/admintool/db/data/mysql/help_keyword.frm b/docker/admintool/db/data/mysql/help_keyword.frm new file mode 100644 index 0000000..2a66573 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_keyword.frm differ diff --git a/docker/admintool/db/data/mysql/help_relation.MAD b/docker/admintool/db/data/mysql/help_relation.MAD new file mode 100644 index 0000000..1a0dc61 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_relation.MAD differ diff --git a/docker/admintool/db/data/mysql/help_relation.MAI b/docker/admintool/db/data/mysql/help_relation.MAI new file mode 100644 index 0000000..86eb265 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_relation.MAI differ diff --git a/docker/admintool/db/data/mysql/help_relation.frm b/docker/admintool/db/data/mysql/help_relation.frm new file mode 100644 index 0000000..f1b6544 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_relation.frm differ diff --git a/docker/admintool/db/data/mysql/help_topic.MAD b/docker/admintool/db/data/mysql/help_topic.MAD new file mode 100644 index 0000000..65fe49f Binary files /dev/null and b/docker/admintool/db/data/mysql/help_topic.MAD differ diff --git a/docker/admintool/db/data/mysql/help_topic.MAI b/docker/admintool/db/data/mysql/help_topic.MAI new file mode 100644 index 0000000..5d7ef48 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_topic.MAI differ diff --git a/docker/admintool/db/data/mysql/help_topic.frm b/docker/admintool/db/data/mysql/help_topic.frm new file mode 100644 index 0000000..6dd29c6 Binary files /dev/null and b/docker/admintool/db/data/mysql/help_topic.frm differ diff --git a/docker/admintool/db/data/mysql/index_stats.MAD b/docker/admintool/db/data/mysql/index_stats.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/index_stats.MAD differ diff --git a/docker/admintool/db/data/mysql/index_stats.MAI b/docker/admintool/db/data/mysql/index_stats.MAI new file mode 100644 index 0000000..117c0d6 Binary files /dev/null and b/docker/admintool/db/data/mysql/index_stats.MAI differ diff --git a/docker/admintool/db/data/mysql/index_stats.frm b/docker/admintool/db/data/mysql/index_stats.frm new file mode 100644 index 0000000..d964115 Binary files /dev/null and b/docker/admintool/db/data/mysql/index_stats.frm differ diff --git a/docker/admintool/db/data/mysql/innodb_index_stats.frm b/docker/admintool/db/data/mysql/innodb_index_stats.frm new file mode 100644 index 0000000..9f48214 Binary files /dev/null and b/docker/admintool/db/data/mysql/innodb_index_stats.frm differ diff --git a/docker/admintool/db/data/mysql/innodb_index_stats.ibd b/docker/admintool/db/data/mysql/innodb_index_stats.ibd new file mode 100644 index 0000000..419d61a Binary files /dev/null and b/docker/admintool/db/data/mysql/innodb_index_stats.ibd differ diff --git a/docker/admintool/db/data/mysql/innodb_table_stats.frm b/docker/admintool/db/data/mysql/innodb_table_stats.frm new file mode 100644 index 0000000..45a0180 Binary files /dev/null and b/docker/admintool/db/data/mysql/innodb_table_stats.frm differ diff --git a/docker/admintool/db/data/mysql/innodb_table_stats.ibd b/docker/admintool/db/data/mysql/innodb_table_stats.ibd new file mode 100644 index 0000000..e721224 Binary files /dev/null and b/docker/admintool/db/data/mysql/innodb_table_stats.ibd differ diff --git a/docker/admintool/db/data/mysql/plugin.MAD b/docker/admintool/db/data/mysql/plugin.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/plugin.MAD differ diff --git a/docker/admintool/db/data/mysql/plugin.MAI b/docker/admintool/db/data/mysql/plugin.MAI new file mode 100644 index 0000000..4386c7a Binary files /dev/null and b/docker/admintool/db/data/mysql/plugin.MAI differ diff --git a/docker/admintool/db/data/mysql/plugin.frm b/docker/admintool/db/data/mysql/plugin.frm new file mode 100644 index 0000000..bb2ebb9 Binary files /dev/null and b/docker/admintool/db/data/mysql/plugin.frm differ diff --git a/docker/admintool/db/data/mysql/proc.MAD b/docker/admintool/db/data/mysql/proc.MAD new file mode 100644 index 0000000..aaeb9a8 Binary files /dev/null and b/docker/admintool/db/data/mysql/proc.MAD differ diff --git a/docker/admintool/db/data/mysql/proc.MAI b/docker/admintool/db/data/mysql/proc.MAI new file mode 100644 index 0000000..b0fc4fa Binary files /dev/null and b/docker/admintool/db/data/mysql/proc.MAI differ diff --git a/docker/admintool/db/data/mysql/proc.frm b/docker/admintool/db/data/mysql/proc.frm new file mode 100644 index 0000000..673a269 Binary files /dev/null and b/docker/admintool/db/data/mysql/proc.frm differ diff --git a/docker/admintool/db/data/mysql/procs_priv.MAD b/docker/admintool/db/data/mysql/procs_priv.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/procs_priv.MAD differ diff --git a/docker/admintool/db/data/mysql/procs_priv.MAI b/docker/admintool/db/data/mysql/procs_priv.MAI new file mode 100644 index 0000000..dd4835e Binary files /dev/null and b/docker/admintool/db/data/mysql/procs_priv.MAI differ diff --git a/docker/admintool/db/data/mysql/procs_priv.frm b/docker/admintool/db/data/mysql/procs_priv.frm new file mode 100644 index 0000000..307303d Binary files /dev/null and b/docker/admintool/db/data/mysql/procs_priv.frm differ diff --git a/docker/admintool/db/data/mysql/proxies_priv.MAD b/docker/admintool/db/data/mysql/proxies_priv.MAD new file mode 100644 index 0000000..81aa30e Binary files /dev/null and b/docker/admintool/db/data/mysql/proxies_priv.MAD differ diff --git a/docker/admintool/db/data/mysql/proxies_priv.MAI b/docker/admintool/db/data/mysql/proxies_priv.MAI new file mode 100644 index 0000000..a63be65 Binary files /dev/null and b/docker/admintool/db/data/mysql/proxies_priv.MAI differ diff --git a/docker/admintool/db/data/mysql/proxies_priv.frm b/docker/admintool/db/data/mysql/proxies_priv.frm new file mode 100644 index 0000000..7b2c5b2 Binary files /dev/null and b/docker/admintool/db/data/mysql/proxies_priv.frm differ diff --git a/docker/admintool/db/data/mysql/roles_mapping.MAD b/docker/admintool/db/data/mysql/roles_mapping.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/roles_mapping.MAD differ diff --git a/docker/admintool/db/data/mysql/roles_mapping.MAI b/docker/admintool/db/data/mysql/roles_mapping.MAI new file mode 100644 index 0000000..6a3c549 Binary files /dev/null and b/docker/admintool/db/data/mysql/roles_mapping.MAI differ diff --git a/docker/admintool/db/data/mysql/roles_mapping.frm b/docker/admintool/db/data/mysql/roles_mapping.frm new file mode 100644 index 0000000..ee97b80 Binary files /dev/null and b/docker/admintool/db/data/mysql/roles_mapping.frm differ diff --git a/docker/admintool/db/data/mysql/servers.MAD b/docker/admintool/db/data/mysql/servers.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/servers.MAD differ diff --git a/docker/admintool/db/data/mysql/servers.MAI b/docker/admintool/db/data/mysql/servers.MAI new file mode 100644 index 0000000..e8af14c Binary files /dev/null and b/docker/admintool/db/data/mysql/servers.MAI differ diff --git a/docker/admintool/db/data/mysql/servers.frm b/docker/admintool/db/data/mysql/servers.frm new file mode 100644 index 0000000..0ef7df0 Binary files /dev/null and b/docker/admintool/db/data/mysql/servers.frm differ diff --git a/docker/admintool/db/data/mysql/slow_log.CSM b/docker/admintool/db/data/mysql/slow_log.CSM new file mode 100644 index 0000000..8d08b8d Binary files /dev/null and b/docker/admintool/db/data/mysql/slow_log.CSM differ diff --git a/docker/admintool/db/data/mysql/slow_log.CSV b/docker/admintool/db/data/mysql/slow_log.CSV new file mode 100644 index 0000000..e69de29 diff --git a/docker/admintool/db/data/mysql/slow_log.frm b/docker/admintool/db/data/mysql/slow_log.frm new file mode 100644 index 0000000..3016a6f Binary files /dev/null and b/docker/admintool/db/data/mysql/slow_log.frm differ diff --git a/docker/admintool/db/data/mysql/table_stats.MAD b/docker/admintool/db/data/mysql/table_stats.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/table_stats.MAD differ diff --git a/docker/admintool/db/data/mysql/table_stats.MAI b/docker/admintool/db/data/mysql/table_stats.MAI new file mode 100644 index 0000000..e9fde2d Binary files /dev/null and b/docker/admintool/db/data/mysql/table_stats.MAI differ diff --git a/docker/admintool/db/data/mysql/table_stats.frm b/docker/admintool/db/data/mysql/table_stats.frm new file mode 100644 index 0000000..cf913f3 Binary files /dev/null and b/docker/admintool/db/data/mysql/table_stats.frm differ diff --git a/docker/admintool/db/data/mysql/tables_priv.MAD b/docker/admintool/db/data/mysql/tables_priv.MAD new file mode 100644 index 0000000..74de09a Binary files /dev/null and b/docker/admintool/db/data/mysql/tables_priv.MAD differ diff --git a/docker/admintool/db/data/mysql/tables_priv.MAI b/docker/admintool/db/data/mysql/tables_priv.MAI new file mode 100644 index 0000000..1c53cce Binary files /dev/null and b/docker/admintool/db/data/mysql/tables_priv.MAI differ diff --git a/docker/admintool/db/data/mysql/tables_priv.frm b/docker/admintool/db/data/mysql/tables_priv.frm new file mode 100644 index 0000000..85875b0 Binary files /dev/null and b/docker/admintool/db/data/mysql/tables_priv.frm differ diff --git a/docker/admintool/db/data/mysql/time_zone.MAD b/docker/admintool/db/data/mysql/time_zone.MAD new file mode 100644 index 0000000..f6e572f Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone.MAD differ diff --git a/docker/admintool/db/data/mysql/time_zone.MAI b/docker/admintool/db/data/mysql/time_zone.MAI new file mode 100644 index 0000000..b08a32b Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone.MAI differ diff --git a/docker/admintool/db/data/mysql/time_zone.frm b/docker/admintool/db/data/mysql/time_zone.frm new file mode 100644 index 0000000..aeadccc Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone.frm differ diff --git a/docker/admintool/db/data/mysql/time_zone_leap_second.MAD b/docker/admintool/db/data/mysql/time_zone_leap_second.MAD new file mode 100644 index 0000000..3dcc005 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_leap_second.MAD differ diff --git a/docker/admintool/db/data/mysql/time_zone_leap_second.MAI b/docker/admintool/db/data/mysql/time_zone_leap_second.MAI new file mode 100644 index 0000000..8960417 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_leap_second.MAI differ diff --git a/docker/admintool/db/data/mysql/time_zone_leap_second.frm b/docker/admintool/db/data/mysql/time_zone_leap_second.frm new file mode 100644 index 0000000..380b50f Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_leap_second.frm differ diff --git a/docker/admintool/db/data/mysql/time_zone_name.MAD b/docker/admintool/db/data/mysql/time_zone_name.MAD new file mode 100644 index 0000000..59396ae Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_name.MAD differ diff --git a/docker/admintool/db/data/mysql/time_zone_name.MAI b/docker/admintool/db/data/mysql/time_zone_name.MAI new file mode 100644 index 0000000..13a8b48 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_name.MAI differ diff --git a/docker/admintool/db/data/mysql/time_zone_name.frm b/docker/admintool/db/data/mysql/time_zone_name.frm new file mode 100644 index 0000000..3bc20db Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_name.frm differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition.MAD b/docker/admintool/db/data/mysql/time_zone_transition.MAD new file mode 100644 index 0000000..bd4c695 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition.MAD differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition.MAI b/docker/admintool/db/data/mysql/time_zone_transition.MAI new file mode 100644 index 0000000..7b7c191 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition.MAI differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition.frm b/docker/admintool/db/data/mysql/time_zone_transition.frm new file mode 100644 index 0000000..488a219 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition.frm differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition_type.MAD b/docker/admintool/db/data/mysql/time_zone_transition_type.MAD new file mode 100644 index 0000000..3965e78 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition_type.MAD differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition_type.MAI b/docker/admintool/db/data/mysql/time_zone_transition_type.MAI new file mode 100644 index 0000000..a2232f3 Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition_type.MAI differ diff --git a/docker/admintool/db/data/mysql/time_zone_transition_type.frm b/docker/admintool/db/data/mysql/time_zone_transition_type.frm new file mode 100644 index 0000000..6e0128c Binary files /dev/null and b/docker/admintool/db/data/mysql/time_zone_transition_type.frm differ diff --git a/docker/admintool/db/data/mysql/transaction_registry.frm b/docker/admintool/db/data/mysql/transaction_registry.frm new file mode 100644 index 0000000..87dcac3 Binary files /dev/null and b/docker/admintool/db/data/mysql/transaction_registry.frm differ diff --git a/docker/admintool/db/data/mysql/transaction_registry.ibd b/docker/admintool/db/data/mysql/transaction_registry.ibd new file mode 100644 index 0000000..5e35946 Binary files /dev/null and b/docker/admintool/db/data/mysql/transaction_registry.ibd differ diff --git a/docker/admintool/db/data/mysql/user.frm b/docker/admintool/db/data/mysql/user.frm new file mode 100644 index 0000000..9a153d9 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493626684758 +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=utf8mb4 +connection_cl_name=utf8mb4_general_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=101108 diff --git a/docker/admintool/db/data/mysql_upgrade_info b/docker/admintool/db/data/mysql_upgrade_info new file mode 100644 index 0000000..e913e3e --- /dev/null +++ b/docker/admintool/db/data/mysql_upgrade_info @@ -0,0 +1 @@ +10.11.8-MariaDB \ No newline at end of file diff --git a/docker/admintool/db/data/performance_schema/db.opt b/docker/admintool/db/data/performance_schema/db.opt new file mode 100644 index 0000000..22f8585 --- /dev/null +++ b/docker/admintool/db/data/performance_schema/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb3 +default-collation=utf8mb3_general_ci diff --git a/docker/admintool/db/data/sys/db.opt b/docker/admintool/db/data/sys/db.opt new file mode 100644 index 0000000..22f8585 --- /dev/null +++ b/docker/admintool/db/data/sys/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb3 +default-collation=utf8mb3_general_ci diff --git a/docker/admintool/db/data/sys/host_summary.frm b/docker/admintool/db/data/sys/host_summary.frm new file mode 100644 index 0000000..e2f831d --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull(sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on(`performance_schema`.`accounts`.`HOST` = `stmt`.`host`)) join `sys`.`x$host_summary_by_file_io` `io` on(`performance_schema`.`accounts`.`HOST` = `io`.`host`)) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on(`performance_schema`.`accounts`.`HOST` = `mem`.`host`)) group by if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +md5=f319a7f1693b4c812cc3bc0e8f33801d +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627998500 +create-version=2 +source=SELECT IF(accounts.host IS NULL, \'background\', accounts.host) AS host,\n SUM(stmt.total) AS statements,\n sys.format_time(SUM(stmt.total_latency)) AS statement_latency,\n sys.format_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 sys.format_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`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull(sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,`sys`.`format_bytes`(sum(`mem`.`current_allocated`)) AS `current_memory`,`sys`.`format_bytes`(sum(`mem`.`total_allocated`)) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on(`performance_schema`.`accounts`.`HOST` = `stmt`.`host`)) join `sys`.`x$host_summary_by_file_io` `io` on(`performance_schema`.`accounts`.`HOST` = `io`.`host`)) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on(`performance_schema`.`accounts`.`HOST` = `mem`.`host`)) group by if(`performance_schema`.`accounts`.`HOST` is null,\'background\',`performance_schema`.`accounts`.`HOST`) +mariadb-version=101108 diff --git a/docker/admintool/db/data/sys/host_summary_by_file_io.frm b/docker/admintool/db/data/sys/host_summary_by_file_io.frm new file mode 100644 index 0000000..acc7b1b --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`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=2a4e8a3ceaf55936719a64b71a0ae19c +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627941894 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS ios,\n sys.format_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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `io_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file/%\' group by if(`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=101108 diff --git a/docker/admintool/db/data/sys/host_summary_by_file_io_type.frm b/docker/admintool/db/data/sys/host_summary_by_file_io_type.frm new file mode 100644 index 0000000..01747e0 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0 order by if(`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=1b3d817a1f063c2f63fb3ec8531f4947 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627929629 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \'wait/io/file%\' and `performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0 order by if(`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=101108 diff --git a/docker/admintool/db/data/sys/host_summary_by_stages.frm b/docker/admintool/db/data/sys/host_summary_by_stages.frm new file mode 100644 index 0000000..cb3fad4 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where `performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`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=9470b3b8680026f46359805c2e55231f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627981462 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_host_by_event_name` where `performance_schema`.`events_stages_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` <> 0 order by if(`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=101108 diff --git a/docker/admintool/db/data/sys/host_summary_by_statement_latency.frm b/docker/admintool/db/data/sys/host_summary_by_statement_latency.frm new file mode 100644 index 0000000..b78d399 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(`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=7b64b14b6309fc98655927f158de463b +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627968242 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n SUM(count_star) AS total,\n sys.format_time(SUM(sum_timer_wait)) AS total_latency,\n sys.format_time(MAX(max_timer_wait)) AS max_latency,\n sys.format_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`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(max(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_LOCK_TIME`)) AS `lock_latency`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_SENT`) AS `rows_sent`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_EXAMINED`) AS `rows_examined`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_ROWS_AFFECTED`) AS `rows_affected`,sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_INDEX_USED`) + sum(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_NO_GOOD_INDEX_USED`) AS `full_scans` from `performance_schema`.`events_statements_summary_by_host_by_event_name` group by if(`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=101108 diff --git a/docker/admintool/db/data/sys/host_summary_by_statement_type.frm b/docker/admintool/db/data/sys/host_summary_by_statement_type.frm new file mode 100644 index 0000000..a5208f9 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=6f4cd80d1e2c188e53dce8feb658404f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627955620 +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 sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(max_timer_wait) AS max_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/innodb_buffer_stats_by_schema.frm b/docker/admintool/db/data/sys/innodb_buffer_stats_by_schema.frm new file mode 100644 index 0000000..418b857 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627425007 +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=101108 diff --git a/docker/admintool/db/data/sys/innodb_buffer_stats_by_table.frm b/docker/admintool/db/data/sys/innodb_buffer_stats_by_table.frm new file mode 100644 index 0000000..8a8b4f5 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627440303 +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=101108 diff --git a/docker/admintool/db/data/sys/innodb_lock_waits.frm b/docker/admintool/db/data/sys/innodb_lock_waits.frm new file mode 100644 index 0000000..43c4676 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627460221 +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=101108 diff --git a/docker/admintool/db/data/sys/io_by_thread_by_latency.frm b/docker/admintool/db/data/sys/io_by_thread_by_latency.frm new file mode 100644 index 0000000..22cab94 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_time`(avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`)) AS `avg_latency`,`sys`.`format_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=dce25697cb41a32a6d6e919f318d5d12 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627527076 +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 sys.format_time(SUM(sum_timer_wait)) total_latency,\n sys.format_time(MIN(min_timer_wait)) min_latency,\n sys.format_time(AVG(avg_timer_wait)) avg_latency,\n sys.format_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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_time`(avg(`performance_schema`.`events_waits_summary_by_thread_by_event_name`.`AVG_TIMER_WAIT`)) AS `avg_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/io_global_by_file_by_bytes.frm b/docker/admintool/db/data/sys/io_global_by_file_by_bytes.frm new file mode 100644 index 0000000..ca4524d --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627541134 +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=101108 diff --git a/docker/admintool/db/data/sys/io_global_by_file_by_latency.frm b/docker/admintool/db/data/sys/io_global_by_file_by_latency.frm new file mode 100644 index 0000000..bba564e --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`sys`.`format_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=df1590c01c7120af1cfc8bf4d4c33e23 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627553780 +create-version=2 +source=SELECT sys.format_path(file_name) AS file,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n count_read,\n sys.format_time(sum_timer_read) AS read_latency,\n count_write,\n sys.format_time(sum_timer_write) AS write_latency,\n count_misc,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WAIT`) AS `total_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_READ` AS `count_read`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_READ`) AS `read_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_WRITE` AS `count_write`,`sys`.`format_time`(`performance_schema`.`file_summary_by_instance`.`SUM_TIMER_WRITE`) AS `write_latency`,`performance_schema`.`file_summary_by_instance`.`COUNT_MISC` AS `count_misc`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/io_global_by_wait_by_bytes.frm b/docker/admintool/db/data/sys/io_global_by_wait_by_bytes.frm new file mode 100644 index 0000000..5ec1c92 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=cd570a8d6f67086a61f0444d90cac1c5 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627567095 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(min_timer_wait) AS min_latency,\n sys.format_time(avg_timer_wait) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/io_global_by_wait_by_latency.frm b/docker/admintool/db/data/sys/io_global_by_wait_by_latency.frm new file mode 100644 index 0000000..1e0a3eb --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ`) AS `read_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE`) AS `write_latency`,`sys`.`format_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=01b4be751a8db1609587d4a025f094a8 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627580243 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name, \'/\', -2) AS event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(avg_timer_wait) AS avg_latency,\n sys.format_time(max_timer_wait) AS max_latency,\n sys.format_time(sum_timer_read) AS read_latency,\n sys.format_time(sum_timer_write) AS write_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ`) AS `read_latency`,`sys`.`format_time`(`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE`) AS `write_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/latest_file_io.frm b/docker/admintool/db/data/sys/latest_file_io.frm new file mode 100644 index 0000000..8eed953 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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=366a303f3a9228de9e50ba7914ec9ccb +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627513318 +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 sys.format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/memory_by_host_by_current_bytes.frm b/docker/admintool/db/data/sys/memory_by_host_by_current_bytes.frm new file mode 100644 index 0000000..24dd751 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627607353 +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=101108 diff --git a/docker/admintool/db/data/sys/memory_by_thread_by_current_bytes.frm b/docker/admintool/db/data/sys/memory_by_thread_by_current_bytes.frm new file mode 100644 index 0000000..9086f45 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627621216 +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=101108 diff --git a/docker/admintool/db/data/sys/memory_by_user_by_current_bytes.frm b/docker/admintool/db/data/sys/memory_by_user_by_current_bytes.frm new file mode 100644 index 0000000..07ff4cb --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627593921 +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=101108 diff --git a/docker/admintool/db/data/sys/memory_global_by_current_bytes.frm b/docker/admintool/db/data/sys/memory_global_by_current_bytes.frm new file mode 100644 index 0000000..87e31a4 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627634854 +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=101108 diff --git a/docker/admintool/db/data/sys/memory_global_total.frm b/docker/admintool/db/data/sys/memory_global_total.frm new file mode 100644 index 0000000..f0046c9 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627646968 +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=101108 diff --git a/docker/admintool/db/data/sys/metrics.frm b/docker/admintool/db/data/sys/metrics.frm new file mode 100644 index 0000000..cdef2cc --- /dev/null +++ b/docker/admintool/db/data/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=4eec971a353c3babe46668653b2280ff +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628075606 +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=101108 diff --git a/docker/admintool/db/data/sys/processlist.frm b/docker/admintool/db/data/sys/processlist.frm new file mode 100644 index 0000000..4865aea --- /dev/null +++ b/docker/admintool/db/data/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,`sys`.`format_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`,`sys`.`format_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,`sys`.`format_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\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_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\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) desc +md5=13dc3d87051f1ecea67d69bf8b397cc2 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628087984 +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 sys.format_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 sys.format_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 sys.format_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 sys.format_time(ewc.timer_wait)) last_wait_latency,\n ewc.source,\n sys.format_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,`sys`.`format_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`,`sys`.`format_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,`sys`.`format_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\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_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\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) desc +mariadb-version=101108 diff --git a/docker/admintool/db/data/sys/ps_check_lost_instrumentation.frm b/docker/admintool/db/data/sys/ps_check_lost_instrumentation.frm new file mode 100644 index 0000000..b204653 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627504619 +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=101108 diff --git a/docker/admintool/db/data/sys/schema_auto_increment_columns.frm b/docker/admintool/db/data/sys/schema_auto_increment_columns.frm new file mode 100644 index 0000000..079e7a8 --- /dev/null +++ b/docker/admintool/db/data/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=149e162c15ae1a0cb14a7ca374e833f2 +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627480008 +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=101108 diff --git a/docker/admintool/db/data/sys/schema_index_statistics.frm b/docker/admintool/db/data/sys/schema_index_statistics.frm new file mode 100644 index 0000000..4f2a98b --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_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=653b24e1a906acd2d41ff3db83c7c67f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627660765 +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 sys.format_time(SUM_TIMER_FETCH) AS select_latency,\n COUNT_INSERT AS rows_inserted,\n sys.format_time(SUM_TIMER_INSERT) AS insert_latency,\n COUNT_UPDATE AS rows_updated,\n sys.format_time(SUM_TIMER_UPDATE) AS update_latency,\n COUNT_DELETE AS rows_deleted,\n sys.format_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`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/schema_object_overview.frm b/docker/admintool/db/data/sys/schema_object_overview.frm new file mode 100644 index 0000000..6ab3ed4 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627473535 +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=101108 diff --git a/docker/admintool/db/data/sys/schema_redundant_indexes.frm b/docker/admintool/db/data/sys/schema_redundant_indexes.frm new file mode 100644 index 0000000..74c65bc --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627496464 +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=101108 diff --git a/docker/admintool/db/data/sys/schema_table_lock_waits.frm b/docker/admintool/db/data/sys/schema_table_lock_waits.frm new file mode 100644 index 0000000..f56c80f --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627732445 +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=101108 diff --git a/docker/admintool/db/data/sys/schema_table_statistics.frm b/docker/admintool/db/data/sys/schema_table_statistics.frm new file mode 100644 index 0000000..bd8ab31 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`pst`.`SUM_TIMER_WAIT`) AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_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=c34825fe4b412edf8838dd1e9fa71d32 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627682328 +create-version=2 +source=SELECT pst.object_schema AS table_schema,\n pst.object_name AS table_name,\n sys.format_time(pst.sum_timer_wait) AS total_latency,\n pst.count_fetch AS rows_fetched,\n sys.format_time(pst.sum_timer_fetch) AS fetch_latency,\n pst.count_insert AS rows_inserted,\n sys.format_time(pst.sum_timer_insert) AS insert_latency,\n pst.count_update AS rows_updated,\n sys.format_time(pst.sum_timer_update) AS update_latency,\n pst.count_delete AS rows_deleted,\n sys.format_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 sys.format_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 sys.format_time(fsbi.sum_timer_write) AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n sys.format_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`,`sys`.`format_time`(`pst`.`SUM_TIMER_WAIT`) AS `total_latency`,`pst`.`COUNT_FETCH` AS `rows_fetched`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/schema_table_statistics_with_buffer.frm b/docker/admintool/db/data/sys/schema_table_statistics_with_buffer.frm new file mode 100644 index 0000000..db46ec1 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_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=80541f22e751b632dc10f13dfb16203c +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627696526 +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 sys.format_time(pst.sum_timer_fetch) AS fetch_latency,\n pst.count_insert AS rows_inserted,\n sys.format_time(pst.sum_timer_insert) AS insert_latency,\n pst.count_update AS rows_updated,\n sys.format_time(pst.sum_timer_update) AS update_latency,\n pst.count_delete AS rows_deleted,\n sys.format_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 sys.format_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 sys.format_time(fsbi.sum_timer_write) AS io_write_latency,\n fsbi.count_misc AS io_misc_requests,\n sys.format_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`,`sys`.`format_time`(`pst`.`SUM_TIMER_FETCH`) AS `fetch_latency`,`pst`.`COUNT_INSERT` AS `rows_inserted`,`sys`.`format_time`(`pst`.`SUM_TIMER_INSERT`) AS `insert_latency`,`pst`.`COUNT_UPDATE` AS `rows_updated`,`sys`.`format_time`(`pst`.`SUM_TIMER_UPDATE`) AS `update_latency`,`pst`.`COUNT_DELETE` AS `rows_deleted`,`sys`.`format_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`,`sys`.`format_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`,`sys`.`format_time`(`fsbi`.`sum_timer_write`) AS `io_write_latency`,`fsbi`.`count_misc` AS `io_misc_requests`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/schema_tables_with_full_table_scans.frm b/docker/admintool/db/data/sys/schema_tables_with_full_table_scans.frm new file mode 100644 index 0000000..adfa83b --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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=9296f2b8a765ee870ea27dadaa5fbd6d +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627710162 +create-version=2 +source=SELECT object_schema,\n object_name,\n count_read AS rows_full_scanned,\n sys.format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/schema_unused_indexes.frm b/docker/admintool/db/data/sys/schema_unused_indexes.frm new file mode 100644 index 0000000..6e7a839 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627722394 +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=101108 diff --git a/docker/admintool/db/data/sys/session.frm b/docker/admintool/db/data/sys/session.frm new file mode 100644 index 0000000..f005b57 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628102935 +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=101108 diff --git a/docker/admintool/db/data/sys/session_ssl_status.frm b/docker/admintool/db/data/sys/session_ssl_status.frm new file mode 100644 index 0000000..e62877b --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628118168 +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=101108 diff --git a/docker/admintool/db/data/sys/statement_analysis.frm b/docker/admintool/db/data/sys/statement_analysis.frm new file mode 100644 index 0000000..cff795e --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=de02a74cac6deea4e21b6b16418c121f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627746317 +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 sys.format_time(SUM_TIMER_WAIT) AS total_latency,\n sys.format_time(MAX_TIMER_WAIT) AS max_latency,\n sys.format_time(AVG_TIMER_WAIT) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/statements_with_errors_or_warnings.frm b/docker/admintool/db/data/sys/statements_with_errors_or_warnings.frm new file mode 100644 index 0000000..7d512af --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627759405 +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=101108 diff --git a/docker/admintool/db/data/sys/statements_with_full_table_scans.frm b/docker/admintool/db/data/sys/statements_with_full_table_scans.frm new file mode 100644 index 0000000..191e69e --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) desc +md5=c8744f3897337cd1c7ca0cba7f57e60e +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627772301 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n sys.format_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`,`sys`.`format_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,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_digest`.`SUM_TIMER_WAIT`) desc +mariadb-version=101108 diff --git a/docker/admintool/db/data/sys/statements_with_runtimes_in_95th_percentile.frm b/docker/admintool/db/data/sys/statements_with_runtimes_in_95th_percentile.frm new file mode 100644 index 0000000..b59e2cb --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=e2a580717ba96dd13ea4969cbf2ebd19 +updatable=0 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627806576 +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 sys.format_time(SUM_TIMER_WAIT) AS total_latency,\n sys.format_time(MAX_TIMER_WAIT) AS max_latency,\n sys.format_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`,`sys`.`format_time`(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/statements_with_sorting.frm b/docker/admintool/db/data/sys/statements_with_sorting.frm new file mode 100644 index 0000000..1e1354a --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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=664a2aeb01fd20e693e3ac931da41ce0 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627819205 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME db,\n COUNT_STAR AS exec_count,\n sys.format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/statements_with_temp_tables.frm b/docker/admintool/db/data/sys/statements_with_temp_tables.frm new file mode 100644 index 0000000..3f1942a --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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=8edd289b369f8ee9bfad06dfd002112e +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627833270 +create-version=2 +source=SELECT sys.format_statement(DIGEST_TEXT) AS query,\n SCHEMA_NAME as db,\n COUNT_STAR AS exec_count,\n sys.format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/sys_config.MAD b/docker/admintool/db/data/sys/sys_config.MAD new file mode 100644 index 0000000..87d1835 Binary files /dev/null and b/docker/admintool/db/data/sys/sys_config.MAD differ diff --git a/docker/admintool/db/data/sys/sys_config.MAI b/docker/admintool/db/data/sys/sys_config.MAI new file mode 100644 index 0000000..f23c762 Binary files /dev/null and b/docker/admintool/db/data/sys/sys_config.MAI differ diff --git a/docker/admintool/db/data/sys/sys_config.frm b/docker/admintool/db/data/sys/sys_config.frm new file mode 100644 index 0000000..ff29597 Binary files /dev/null and b/docker/admintool/db/data/sys/sys_config.frm differ diff --git a/docker/admintool/db/data/sys/user_summary.frm b/docker/admintool/db/data/sys/user_summary.frm new file mode 100644 index 0000000..01b7ec7 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull(sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`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=ab4b3d2f67c44888d3adc69a1d3e7111 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627915855 +create-version=2 +source=SELECT IF(accounts.user IS NULL, \'background\', accounts.user) AS user,\n SUM(stmt.total) AS statements,\n sys.format_time(SUM(stmt.total_latency)) AS statement_latency,\n sys.format_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 sys.format_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`,`sys`.`format_time`(sum(`stmt`.`total_latency`)) AS `statement_latency`,`sys`.`format_time`(ifnull(sum(`stmt`.`total_latency`) / nullif(sum(`stmt`.`total`),0),0)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,`sys`.`format_time`(sum(`io`.`io_latency`)) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`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=101108 diff --git a/docker/admintool/db/data/sys/user_summary_by_file_io.frm b/docker/admintool/db/data/sys/user_summary_by_file_io.frm new file mode 100644 index 0000000..6b24e25 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_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=bc7e62b2eda5075d6aac948c3d9cf84f +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627859035 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS ios,\n sys.format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/user_summary_by_file_io_type.frm b/docker/admintool/db/data/sys/user_summary_by_file_io_type.frm new file mode 100644 index 0000000..09883cb --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `latency`,`sys`.`format_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=d213b36ac5f885ac6fefb094299e5a0b +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627846641 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/user_summary_by_stages.frm b/docker/admintool/db/data/sys/user_summary_by_stages.frm new file mode 100644 index 0000000..8dc5298 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_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=5ae1ddf59bc844f2a9a8d2b434b996de +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627898025 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/user_summary_by_statement_latency.frm b/docker/admintool/db/data/sys/user_summary_by_statement_latency.frm new file mode 100644 index 0000000..d9ee64d --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_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=0042d7d1d9f2f1a2f758cd36a995942f +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627884980 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n SUM(count_star) AS total,\n sys.format_time(SUM(sum_timer_wait)) AS total_latency,\n sys.format_time(SUM(max_timer_wait)) AS max_latency,\n sys.format_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`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(sum(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`)) AS `max_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/user_summary_by_statement_type.frm b/docker/admintool/db/data/sys/user_summary_by_statement_type.frm new file mode 100644 index 0000000..4c0e151 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=f1b17f4b2c6b4472eb3b8639a1da6b1f +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627872654 +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 sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(max_timer_wait) AS max_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_statements_summary_by_user_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/version.frm b/docker/admintool/db/data/sys/version.frm new file mode 100644 index 0000000..d592ed0 --- /dev/null +++ b/docker/admintool/db/data/sys/version.frm @@ -0,0 +1,16 @@ +TYPE=VIEW +query=select \'1.5.1\' AS `sys_version`,version() AS `mysql_version` +md5=91a844b992f5531ded209bb44c10bae7 +updatable=0 +algorithm=0 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627284531 +create-version=2 +source=SELECT \'1.5.1\' AS sys_version,\n version() AS mysql_version; +client_cs_name=utf8mb3 +connection_cl_name=utf8mb3_general_ci +view_body_utf8=select \'1.5.1\' AS `sys_version`,version() AS `mysql_version` +mariadb-version=101108 diff --git a/docker/admintool/db/data/sys/wait_classes_global_by_avg_latency.frm b/docker/admintool/db/data/sys/wait_classes_global_by_avg_latency.frm new file mode 100644 index 0000000..8dd84e9 --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(cast(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) as unsigned)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_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`,`sys`.`format_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=f4d862269e9bdada718b48d9615b6995 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628011783 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n sys.format_time(CAST(SUM(sum_timer_wait) AS UNSIGNED)) AS total_latency,\n sys.format_time(MIN(min_timer_wait)) AS min_latency,\n sys.format_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(cast(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) as unsigned)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/wait_classes_global_by_latency.frm b/docker/admintool/db/data/sys/wait_classes_global_by_latency.frm new file mode 100644 index 0000000..894dabe --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_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`,`sys`.`format_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=032bac59939199485c8db617a3f8070f +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628024155 +create-version=2 +source=SELECT SUBSTRING_INDEX(event_name,\'/\', 3) AS event_class,\n SUM(COUNT_STAR) AS total,\n sys.format_time(SUM(sum_timer_wait)) AS total_latency,\n sys.format_time(MIN(min_timer_wait)) min_latency,\n sys.format_time(IFNULL(SUM(sum_timer_wait) / NULLIF(SUM(COUNT_STAR), 0), 0)) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`)) AS `total_latency`,`sys`.`format_time`(min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`)) AS `min_latency`,`sys`.`format_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`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/waits_by_host_by_latency.frm b/docker/admintool/db/data/sys/waits_by_host_by_latency.frm new file mode 100644 index 0000000..4e7c48c --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` <> \'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=58c3c9438a0a7abb25df47451dc32fd0 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628049788 +create-version=2 +source=SELECT IF(host IS NULL, \'background\', host) AS host,\n event_name AS event,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(avg_timer_wait) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where `performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` <> \'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=101108 diff --git a/docker/admintool/db/data/sys/waits_by_user_by_latency.frm b/docker/admintool/db/data/sys/waits_by_user_by_latency.frm new file mode 100644 index 0000000..c20361e --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=66993772335655657bc27e5e9a72fc23 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628037000 +create-version=2 +source=SELECT IF(user IS NULL, \'background\', user) AS user,\n event_name AS event,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(avg_timer_wait) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/waits_global_by_latency.frm b/docker/admintool/db/data/sys/waits_global_by_latency.frm new file mode 100644 index 0000000..bcabafc --- /dev/null +++ b/docker/admintool/db/data/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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=818952ed16255f183d963b428aa0c5b5 +updatable=1 +algorithm=1 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493628062995 +create-version=2 +source=SELECT event_name AS event,\n count_star AS total,\n sys.format_time(sum_timer_wait) AS total_latency,\n sys.format_time(avg_timer_wait) AS avg_latency,\n sys.format_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`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary.frm b/docker/admintool/db/data/sys/x@0024host_summary.frm new file mode 100644 index 0000000..198c584 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628004660 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary_by_file_io.frm b/docker/admintool/db/data/sys/x@0024host_summary_by_file_io.frm new file mode 100644 index 0000000..48bf3c9 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627947994 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary_by_file_io_type.frm b/docker/admintool/db/data/sys/x@0024host_summary_by_file_io_type.frm new file mode 100644 index 0000000..8948317 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627935792 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary_by_stages.frm b/docker/admintool/db/data/sys/x@0024host_summary_by_stages.frm new file mode 100644 index 0000000..d6625b6 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627987495 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary_by_statement_latency.frm b/docker/admintool/db/data/sys/x@0024host_summary_by_statement_latency.frm new file mode 100644 index 0000000..33761a6 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627974371 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024host_summary_by_statement_type.frm b/docker/admintool/db/data/sys/x@0024host_summary_by_statement_type.frm new file mode 100644 index 0000000..a4eb44a --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627961875 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024innodb_buffer_stats_by_schema.frm b/docker/admintool/db/data/sys/x@0024innodb_buffer_stats_by_schema.frm new file mode 100644 index 0000000..648973a --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627432509 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024innodb_buffer_stats_by_table.frm b/docker/admintool/db/data/sys/x@0024innodb_buffer_stats_by_table.frm new file mode 100644 index 0000000..5896b57 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627447423 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024innodb_lock_waits.frm b/docker/admintool/db/data/sys/x@0024innodb_lock_waits.frm new file mode 100644 index 0000000..7036cac --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627466660 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024io_by_thread_by_latency.frm b/docker/admintool/db/data/sys/x@0024io_by_thread_by_latency.frm new file mode 100644 index 0000000..e3c233f --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627533310 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024io_global_by_file_by_bytes.frm b/docker/admintool/db/data/sys/x@0024io_global_by_file_by_bytes.frm new file mode 100644 index 0000000..e282059 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627547455 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024io_global_by_file_by_latency.frm b/docker/admintool/db/data/sys/x@0024io_global_by_file_by_latency.frm new file mode 100644 index 0000000..a0d9ab1 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627559778 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024io_global_by_wait_by_bytes.frm b/docker/admintool/db/data/sys/x@0024io_global_by_wait_by_bytes.frm new file mode 100644 index 0000000..3f54119 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627573366 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024io_global_by_wait_by_latency.frm b/docker/admintool/db/data/sys/x@0024io_global_by_wait_by_latency.frm new file mode 100644 index 0000000..ea75a13 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627586449 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024latest_file_io.frm b/docker/admintool/db/data/sys/x@0024latest_file_io.frm new file mode 100644 index 0000000..76575de --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627519870 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024memory_by_host_by_current_bytes.frm b/docker/admintool/db/data/sys/x@0024memory_by_host_by_current_bytes.frm new file mode 100644 index 0000000..aec8441 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627613457 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024memory_by_thread_by_current_bytes.frm b/docker/admintool/db/data/sys/x@0024memory_by_thread_by_current_bytes.frm new file mode 100644 index 0000000..ec79885 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627627487 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024memory_by_user_by_current_bytes.frm b/docker/admintool/db/data/sys/x@0024memory_by_user_by_current_bytes.frm new file mode 100644 index 0000000..412e227 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627600206 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024memory_global_by_current_bytes.frm b/docker/admintool/db/data/sys/x@0024memory_global_by_current_bytes.frm new file mode 100644 index 0000000..20a393b --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627640986 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024memory_global_total.frm b/docker/admintool/db/data/sys/x@0024memory_global_total.frm new file mode 100644 index 0000000..dc90b61 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627653048 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024processlist.frm b/docker/admintool/db/data/sys/x@0024processlist.frm new file mode 100644 index 0000000..e376957 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628094790 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm b/docker/admintool/db/data/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm new file mode 100644 index 0000000..b7f9e23 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627796106 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024ps_digest_avg_latency_distribution.frm b/docker/admintool/db/data/sys/x@0024ps_digest_avg_latency_distribution.frm new file mode 100644 index 0000000..4cb1190 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627785344 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024ps_schema_table_statistics_io.frm b/docker/admintool/db/data/sys/x@0024ps_schema_table_statistics_io.frm new file mode 100644 index 0000000..4af4fa0 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627672828 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_flattened_keys.frm b/docker/admintool/db/data/sys/x@0024schema_flattened_keys.frm new file mode 100644 index 0000000..565cd90 --- /dev/null +++ b/docker/admintool/db/data/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=481b526d4164504abbca5c600860e8c5 +updatable=0 +algorithm=2 +definer_user=mariadb.sys +definer_host=localhost +suid=0 +with_check_option=0 +timestamp=0001722493627486923 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_index_statistics.frm b/docker/admintool/db/data/sys/x@0024schema_index_statistics.frm new file mode 100644 index 0000000..6cfb289 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627666756 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_table_lock_waits.frm b/docker/admintool/db/data/sys/x@0024schema_table_lock_waits.frm new file mode 100644 index 0000000..c113e78 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627738873 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_table_statistics.frm b/docker/admintool/db/data/sys/x@0024schema_table_statistics.frm new file mode 100644 index 0000000..0037bd5 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627688676 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_table_statistics_with_buffer.frm b/docker/admintool/db/data/sys/x@0024schema_table_statistics_with_buffer.frm new file mode 100644 index 0000000..e4c5ec9 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627703621 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024schema_tables_with_full_table_scans.frm b/docker/admintool/db/data/sys/x@0024schema_tables_with_full_table_scans.frm new file mode 100644 index 0000000..f15aedd --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627716233 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024session.frm b/docker/admintool/db/data/sys/x@0024session.frm new file mode 100644 index 0000000..5aa9d6f --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628110513 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statement_analysis.frm b/docker/admintool/db/data/sys/x@0024statement_analysis.frm new file mode 100644 index 0000000..f5a3fe2 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627753147 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statements_with_errors_or_warnings.frm b/docker/admintool/db/data/sys/x@0024statements_with_errors_or_warnings.frm new file mode 100644 index 0000000..3885d2e --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627765727 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statements_with_full_table_scans.frm b/docker/admintool/db/data/sys/x@0024statements_with_full_table_scans.frm new file mode 100644 index 0000000..1b07339 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627778635 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statements_with_runtimes_in_95th_percentile.frm b/docker/admintool/db/data/sys/x@0024statements_with_runtimes_in_95th_percentile.frm new file mode 100644 index 0000000..aaf9450 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627812861 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statements_with_sorting.frm b/docker/admintool/db/data/sys/x@0024statements_with_sorting.frm new file mode 100644 index 0000000..197f7ec --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627826524 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024statements_with_temp_tables.frm b/docker/admintool/db/data/sys/x@0024statements_with_temp_tables.frm new file mode 100644 index 0000000..580e5b1 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627839505 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary.frm b/docker/admintool/db/data/sys/x@0024user_summary.frm new file mode 100644 index 0000000..cd060e2 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627922318 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary_by_file_io.frm b/docker/admintool/db/data/sys/x@0024user_summary_by_file_io.frm new file mode 100644 index 0000000..3172838 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627865091 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary_by_file_io_type.frm b/docker/admintool/db/data/sys/x@0024user_summary_by_file_io_type.frm new file mode 100644 index 0000000..c266013 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627852760 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary_by_stages.frm b/docker/admintool/db/data/sys/x@0024user_summary_by_stages.frm new file mode 100644 index 0000000..341b5ef --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627904039 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary_by_statement_latency.frm b/docker/admintool/db/data/sys/x@0024user_summary_by_statement_latency.frm new file mode 100644 index 0000000..9ca2f98 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627891025 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024user_summary_by_statement_type.frm b/docker/admintool/db/data/sys/x@0024user_summary_by_statement_type.frm new file mode 100644 index 0000000..d7764ca --- /dev/null +++ b/docker/admintool/db/data/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=0001722493627878677 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024wait_classes_global_by_avg_latency.frm b/docker/admintool/db/data/sys/x@0024wait_classes_global_by_avg_latency.frm new file mode 100644 index 0000000..57f3c57 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628017913 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024wait_classes_global_by_latency.frm b/docker/admintool/db/data/sys/x@0024wait_classes_global_by_latency.frm new file mode 100644 index 0000000..8fc9ddd --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628030265 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024waits_by_host_by_latency.frm b/docker/admintool/db/data/sys/x@0024waits_by_host_by_latency.frm new file mode 100644 index 0000000..fa08938 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628056421 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024waits_by_user_by_latency.frm b/docker/admintool/db/data/sys/x@0024waits_by_user_by_latency.frm new file mode 100644 index 0000000..cbb886c --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628043259 +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=101108 diff --git a/docker/admintool/db/data/sys/x@0024waits_global_by_latency.frm b/docker/admintool/db/data/sys/x@0024waits_global_by_latency.frm new file mode 100644 index 0000000..e696ac3 --- /dev/null +++ b/docker/admintool/db/data/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=0001722493628069023 +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=101108 diff --git a/docker/admintool/db/data/user_stat/db.opt b/docker/admintool/db/data/user_stat/db.opt new file mode 100644 index 0000000..ccbf699 --- /dev/null +++ b/docker/admintool/db/data/user_stat/db.opt @@ -0,0 +1,2 @@ +default-character-set=utf8mb4 +default-collation=utf8mb4_general_ci diff --git a/docker/admintool/db/initdb.d/create_table.sql b/docker/admintool/db/initdb.d/create_table.sql new file mode 100644 index 0000000..a77c38a --- /dev/null +++ b/docker/admintool/db/initdb.d/create_table.sql @@ -0,0 +1,445 @@ +-- -------------------------------------------------------- +-- 호스트: 127.0.0.1 +-- 서버 버전: 10.11.6-MariaDB-1:10.11.6+maria~ubu2204 - mariadb.org binary distribution +-- 서버 OS: debian-linux-gnu +-- HeidiSQL 버전: 12.6.0.6765 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +-- caliverse 데이터베이스 구조 내보내기 +CREATE DATABASE IF NOT EXISTS `caliverse` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */; +USE `caliverse`; + +-- 테이블 caliverse.admin 구조 내보내기 +CREATE TABLE IF NOT EXISTS `admin` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `group_id` bigint(20) DEFAULT NULL, + `email` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `status` varchar(255) NOT NULL, + `deleted` bit(1) NOT NULL DEFAULT b'0', + `pw_update_dt` datetime NOT NULL DEFAULT current_timestamp(), + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + KEY `group_id` (`group_id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.admin:~1 rows (대략적) 내보내기 admin pw : caliverse1! +INSERT INTO `admin` (`id`, `group_id`, `email`, `name`, `password`, `status`, `deleted`, `pw_update_dt`, `create_dt`, `update_by`, `update_dt`) VALUES + (1, 1, 'caliverse_adm@caliverse.io', 'admin', '$2a$10$YU8mg7ITQlFImlj0PwvvbuXQJK7WgEFlQ03T5mhrWrbHbbGiQ3sj2', 'PERMITTED', b'0', '2024-07-30 16:59:23', '2024-01-26 16:05:23', NULL, '2024-01-26 16:05:23'); + +-- 테이블 caliverse.admin_history 구조 내보내기 +CREATE TABLE IF NOT EXISTS `admin_history` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `admin_id` bigint(20) NOT NULL, + `password` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK__admin` (`admin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='어드민 기존 패스워드 관리 테이블'; + +-- 테이블 데이터 caliverse.admin_history:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.admin_log 구조 내보내기 +CREATE TABLE IF NOT EXISTS `admin_log` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `admin_id` bigint(20) NOT NULL, + `name` varchar(255) NOT NULL, + `mail` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `content` longtext DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) USING BTREE, + KEY `admin_id` (`admin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.admin_log:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.authority 구조 내보내기 +CREATE TABLE IF NOT EXISTS `authority` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `auth_menu` varchar(255) NOT NULL, + `auth_name` varchar(255) NOT NULL, + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.authority:~31 rows (대략적) 내보내기 +INSERT INTO `authority` (`id`, `auth_menu`, `auth_name`, `create_by`, `create_dt`, `update_by`, `update_dt`) VALUES + (1, 'ADMINSEARCH', 'READ', NULL, '2023-08-23 17:49:41', NULL, '2023-08-23 17:49:41'), + (2, 'ADMINSEARCH', 'CONFIRM', NULL, '2023-08-23 20:25:00', NULL, '2023-08-23 20:25:00'), + (3, 'ADMINSEARCH', 'UPDATE', NULL, '2023-08-23 20:25:00', NULL, '2023-08-23 20:25:00'), + (4, 'ADMINSEARCH', 'DELETE', NULL, '2023-08-23 20:25:00', NULL, '2023-08-23 20:25:00'), + (5, 'ADMINLOGSEARCH', 'READ', NULL, '2023-08-23 20:32:32', NULL, '2023-08-23 20:32:32'), + (6, 'AUTHORITYSETTING', 'READ', NULL, '2023-08-23 20:32:44', NULL, '2023-08-23 20:32:44'), + (7, 'AUTHORITYSETTING', 'UPDATE', NULL, '2023-08-23 20:32:44', NULL, '2023-08-23 20:32:44'), + (8, 'AUTHORITYSETTING', 'DELETE', NULL, '2023-08-23 20:32:44', NULL, '2023-08-23 20:32:44'), + (9, 'USERINDICATORS', 'READ', NULL, '2023-09-04 10:48:12', NULL, '2023-09-04 10:48:12'), + (10, 'ECOMINDICATORS', 'READ', NULL, '2023-09-04 10:48:12', NULL, '2023-09-04 10:48:12'), + (11, 'USERSEARCH', 'READ', NULL, '2023-09-04 10:50:00', NULL, '2023-09-04 10:50:00'), + (12, 'USERSEARCH', 'UPDATE', NULL, '2023-09-04 10:50:00', NULL, '2023-09-04 10:50:00'), + (13, 'CONTENTSEARCH', 'READ', NULL, '2023-09-04 10:50:00', NULL, '2023-09-04 10:50:00'), + (14, 'GAMELOG', 'READ', NULL, '2023-09-04 10:51:28', NULL, '2023-09-04 10:51:28'), + (15, 'CRYPTO', 'READ', NULL, '2023-09-04 10:51:49', NULL, '2023-09-04 10:51:49'), + (16, 'INGAME', 'READ', NULL, '2023-09-04 10:52:11', NULL, '2023-09-04 10:52:11'), + (17, 'INGAME', 'UPDATE', NULL, '2023-09-04 10:52:11', NULL, '2023-09-04 10:52:11'), + (18, 'INGAME', 'DELETE', NULL, '2023-09-04 10:52:11', NULL, '2023-09-04 10:52:11'), + (19, 'WHITELIST', 'READ', NULL, '2023-09-04 10:52:59', NULL, '2023-09-04 10:52:59'), + (20, 'WHITELIST', 'CONFIRM', NULL, '2023-09-04 10:56:52', NULL, '2023-09-04 10:56:52'), + (21, 'WHITELIST', 'UPDATE', NULL, '2023-09-04 10:52:59', NULL, '2023-09-04 10:52:59'), + (22, 'MAIL', 'READ', NULL, '2023-09-04 10:52:59', NULL, '2023-09-04 10:52:59'), + (23, 'MAIL', 'UPDATE', NULL, '2023-09-04 10:52:59', NULL, '2023-09-04 10:52:59'), + (24, 'BLACKLIST', 'READ', NULL, '2023-09-04 10:52:59', NULL, '2023-09-04 10:52:59'), + (25, 'BLACKLIST', 'UPDATE', NULL, '2023-09-04 10:54:11', NULL, '2023-09-04 10:54:11'), + (26, 'REPORT', 'READ', NULL, '2023-09-04 10:54:24', NULL, '2023-09-04 10:54:24'), + (27, 'REPORT', 'UPDATE', NULL, '2023-09-04 10:54:32', NULL, '2023-09-04 10:54:32'), + (28, 'WHITELIST', 'DELETE', NULL, '2023-10-10 08:22:08', NULL, '2023-10-10 08:22:08'), + (29, 'MAIL', 'DELETE', NULL, '2023-10-10 08:54:38', NULL, '2023-10-10 08:54:38'), + (30, 'BLACKLIST', 'DELETE', NULL, '2023-10-10 08:54:57', NULL, '2023-10-10 08:54:57'), + (31, 'REPORT', 'DELETE', NULL, '2023-10-10 08:55:11', NULL, '2023-10-10 08:55:11'), + (32, 'ITEMLIST', 'READ', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (33, 'ITEMLIST', 'UPDATE', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (34, 'ITEMLIST', 'DELETE', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (35, 'USERSEARCH', 'DELETE', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (36, 'EVENT', 'READ', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (37, 'EVENT', 'UPDATE', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'), + (38, 'EVENT', 'DELETE', NULL, '2024-08-01 08:55:11', NULL, '2024-08-01 08:55:11'); +-- 테이블 caliverse.black_list 구조 내보내기 +CREATE TABLE IF NOT EXISTS `black_list` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `guid` varchar(255) NOT NULL, + `nickname` varchar(50) NOT NULL, + `status` varchar(255) NOT NULL COMMENT '상태(제재중/기간만료/대기중)', + `type` varchar(255) NOT NULL COMMENT '제재 방식(접속제한/채팅제한)', + `sanctions` varchar(255) NOT NULL COMMENT '제재 사유', + `period` varchar(255) NOT NULL COMMENT '제재기간', + `deleted` bit(1) NOT NULL DEFAULT b'0', + `start_dt` datetime NOT NULL COMMENT '제재 시작 일자', + `end_dt` datetime NOT NULL COMMENT '제재 종료 일자', + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='이용자 제재 테이블'; + +-- 테이블 데이터 caliverse.black_list:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.caliverse_meta_data 구조 내보내기 +CREATE TABLE IF NOT EXISTS `caliverse_meta_data` ( + `file_name` varchar(256) NOT NULL, + `data_id` int(11) NOT NULL DEFAULT 0, + `json_data` longtext NOT NULL CHECK (json_valid(`json_data`)), + PRIMARY KEY (`file_name`,`data_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.caliverse_meta_data:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.groups 구조 내보내기 +CREATE TABLE IF NOT EXISTS `groups` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `deleted` bit(1) NOT NULL DEFAULT b'0', + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.groups:~0 rows (대략적) 내보내기 +INSERT INTO `groups` (`id`, `name`, `description`, `deleted`, `create_by`, `create_dt`, `update_by`, `update_dt`) VALUES + (1, '전체관리자권한', '운영툴 전체 메뉴 사용 가능', b'0', 'khlee', '2024-01-26 14:29:20', 'khlee', '2024-01-26 14:29:29'), + (2, '기본권한', '기본 조회 기능만 사용 가능', b'0', 'khlee', '2024-01-26 14:29:20', 'khlee', '2024-01-26 14:29:29'); + +-- 테이블 caliverse.group_auth 구조 내보내기 +CREATE TABLE IF NOT EXISTS `group_auth` ( + `group_auth_id` bigint(20) NOT NULL AUTO_INCREMENT, + `group_id` bigint(20) NOT NULL, + `auth_id` bigint(20) NOT NULL, + PRIMARY KEY (`group_auth_id`), + KEY `FKsx1gx9q7k2thvs83qo1k4xj2o` (`auth_id`), + KEY `FK7iv0c1ovorc2qyb7gd0weu5hk` (`group_id`) +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.group_auth:~31 rows (대략적) 내보내기 +INSERT INTO `group_auth` (`group_auth_id`, `group_id`, `auth_id`) VALUES + (1, 1, 1), + (2, 1, 2), + (3, 1, 3), + (4, 1, 4), + (5, 1, 5), + (6, 1, 6), + (7, 1, 7), + (8, 1, 8), + (9, 1, 9), + (10, 1, 10), + (11, 1, 11), + (12, 1, 12), + (13, 1, 13), + (14, 1, 14), + (15, 1, 15), + (16, 1, 16), + (17, 1, 17), + (18, 1, 18), + (19, 1, 19), + (20, 1, 20), + (21, 1, 21), + (22, 1, 22), + (23, 1, 23), + (24, 1, 24), + (25, 1, 25), + (26, 1, 26), + (27, 1, 27), + (28, 1, 28), + (29, 1, 29), + (30, 1, 30), + (31, 1, 31), + (32, 1, 32), + (33, 1, 33), + (34, 1, 34), + (35, 1, 35), + (36, 1, 36), + (37, 1, 37), + (38, 1, 38); + +-- 테이블 caliverse.item 구조 내보내기 +CREATE TABLE IF NOT EXISTS `item` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `mail_id` bigint(20) NOT NULL, + `type` varchar(50) NOT NULL, + `reward_group_id` varchar(255) NOT NULL, + `item_cnt` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_item_mail` (`mail_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='우편 정보 아이템 테이블'; + +-- 테이블 데이터 caliverse.item:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.mail 구조 내보내기 +CREATE TABLE IF NOT EXISTS `mail` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `target` varchar(255) NOT NULL COMMENT '수신 대상(guid/닉네임/파일명)', + `receive_type` varchar(255) NOT NULL COMMENT '수신 대상(단일/복수)', + `user_type` varchar(255) NOT NULL COMMENT '유저 타입(guid/닉네임)', + `is_reserve` bit(1) NOT NULL DEFAULT b'0' COMMENT '예약 발송 여부', + `send_type` varchar(255) NOT NULL COMMENT '발송 방식', + `send_status` varchar(255) NOT NULL DEFAULT 'WAIT' COMMENT '발송 상태', + `mail_type` varchar(255) NOT NULL COMMENT '우편 타입', + `deleted` bit(1) NOT NULL DEFAULT b'0', + `send_dt` datetime DEFAULT NULL, + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='우편 관리'; + +-- 테이블 데이터 caliverse.mail:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.event 구조 내보내기 +CREATE TABLE IF NOT EXISTS `event` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `event_type` varchar(255) NOT NULL COMMENT '이벤트 타입', + `status` varchar(255) NOT NULL DEFAULT 'WAIT' COMMENT '이벤트 상태', + `deleted` bit(1) NOT NULL DEFAULT b'0', + `delete_desc` varchar(255) DEFAULT NULL COMMENT '삭제 사유', + `start_dt` datetime DEFAULT NULL COMMENT '시작 일자', + `end_dt` datetime DEFAULT NULL COMMENT '종료 일자', + `add_flag` bit(1) NOT NULL DEFAULT b'0' COMMENT '게임DB 추가여부', + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='이벤트 관리'; + +-- 테이블 데이터 caliverse.event:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.message 구조 내보내기 +CREATE TABLE IF NOT EXISTS `message` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `target_id` bigint(20) NOT NULL, + `type` varchar(50) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `content` longtext NOT NULL, + `language` varchar(50) NOT NULL DEFAULT 'ko', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='공지사항& 우편 메시지 내용\r\n'; + +-- 테이블 데이터 caliverse.message:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.notice 구조 내보내기 +CREATE TABLE IF NOT EXISTS `notice` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `message_type` varchar(255) NOT NULL DEFAULT 'CHATTING', + `send_dt` datetime NOT NULL DEFAULT current_timestamp(), + `is_repeat` bit(1) NOT NULL DEFAULT b'0' COMMENT '반복 발송', + `repeat_Type` varchar(255) DEFAULT NULL COMMENT '반복 타입', + `end_dt` datetime DEFAULT NULL COMMENT '종료 일자', + `repeat_dt` time DEFAULT NULL COMMENT '반복 발송 시간', + `repeat_cnt` bigint(20) DEFAULT 0 COMMENT '반복 횟수', + `send_cnt` bigint(20) DEFAULT 0 COMMENT '송출완료 횟수', + `deleted` bit(1) NOT NULL DEFAULT b'0', + `send_status` varchar(255) NOT NULL DEFAULT 'WAIT' COMMENT '발송 상태', + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='인게임 메시지(공지사항)'; + +-- 테이블 데이터 caliverse.notice:~0 rows (대략적) 내보내기 + +-- 테이블 caliverse.token 구조 내보내기 +CREATE TABLE IF NOT EXISTS `token` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `admin_id` bigint(20) NOT NULL, + `expired` bit(1) NOT NULL, + `revoked` bit(1) NOT NULL DEFAULT b'0', + `token` varchar(255) DEFAULT NULL, + `token_type` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `admin_id` (`admin_id`) +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.token:~12 rows (대략적) 내보내기 +INSERT INTO `token` (`id`, `admin_id`, `expired`, `revoked`, `token`, `token_type`) VALUES + (247, 1, b'0', b'0', 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJraGxlZTEwM0Bsb3R0ZS5uZXQiLCJpYXQiOjE3MDcyNzM0ODMsImV4cCI6MTcwNzM1OTg4M30.WC5xFxyVaMAOQ7qr8SLP0VQqLBd4zscYCfhXhwpxOxc', 'BEARER'); + +-- 테이블 caliverse.white_list 구조 내보내기 +CREATE TABLE IF NOT EXISTS `white_list` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `guid` varchar(50) NOT NULL, + `nickname` varchar(50) NOT NULL, + `status` varchar(255) NOT NULL DEFAULT 'REJECT', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '삭제 여부', + `create_by` varchar(255) DEFAULT NULL, + `create_dt` datetime NOT NULL DEFAULT current_timestamp(), + `update_by` varchar(255) DEFAULT NULL, + `update_dt` datetime NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 테이블 데이터 caliverse.white_list:~0 rows (대략적) 내보내기 + +/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */; + +-- Autogenerated: do not edit this file + +CREATE TABLE IF NOT EXISTS BATCH_JOB_INSTANCE ( + JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_NAME VARCHAR(100) NOT NULL, + JOB_KEY VARCHAR(32) NOT NULL, + constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_JOB_EXECUTION ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_INSTANCE_ID BIGINT NOT NULL, + CREATE_TIME DATETIME(6) NOT NULL, + START_TIME DATETIME(6) DEFAULT NULL , + END_TIME DATETIME(6) DEFAULT NULL , + STATUS VARCHAR(10) , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED DATETIME(6), + constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) + references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_JOB_EXECUTION_PARAMS ( + JOB_EXECUTION_ID BIGINT NOT NULL , + PARAMETER_NAME VARCHAR(100) NOT NULL , + PARAMETER_TYPE VARCHAR(100) NOT NULL , + PARAMETER_VALUE VARCHAR(2500) , + IDENTIFYING CHAR(1) NOT NULL , + constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_STEP_EXECUTION ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT NOT NULL, + STEP_NAME VARCHAR(100) NOT NULL, + JOB_EXECUTION_ID BIGINT NOT NULL, + CREATE_TIME DATETIME(6) NOT NULL, + START_TIME DATETIME(6) DEFAULT NULL , + END_TIME DATETIME(6) DEFAULT NULL , + STATUS VARCHAR(10) , + COMMIT_COUNT BIGINT , + READ_COUNT BIGINT , + FILTER_COUNT BIGINT , + WRITE_COUNT BIGINT , + READ_SKIP_COUNT BIGINT , + WRITE_SKIP_COUNT BIGINT , + PROCESS_SKIP_COUNT BIGINT , + ROLLBACK_COUNT BIGINT , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED DATETIME(6), + constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_STEP_EXECUTION_CONTEXT ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) + references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_JOB_EXECUTION_CONTEXT ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS BATCH_STEP_EXECUTION_SEQ ( + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) +) ENGINE=InnoDB; + +-- 테이블 데이터 caliverse.BATCH_STEP_EXECUTION_SEQ:~0 rows (대략적) 내보내기 +INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ); + +CREATE TABLE IF NOT EXISTS BATCH_JOB_EXECUTION_SEQ ( + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) +) ENGINE=InnoDB; + +-- 테이블 데이터 caliverse.BATCH_JOB_EXECUTION_SEQ:~0 rows (대략적) 내보내기 +INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ); + +CREATE TABLE IF NOT EXISTS BATCH_JOB_SEQ ( + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) +) ENGINE=InnoDB; + +-- 테이블 데이터 caliverse.BATCH_JOB_SEQ:~0 rows (대략적) 내보내기 +INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_SEQ); \ No newline at end of file diff --git a/docker/admintool/db/initdb.d/load_data.sql b/docker/admintool/db/initdb.d/load_data.sql new file mode 100644 index 0000000..e69de29 diff --git a/docker/admintool/docker-compose.yml b/docker/admintool/docker-compose.yml new file mode 100644 index 0000000..fcc74fe --- /dev/null +++ b/docker/admintool/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.7' + +services: + db: + image: mariadb:10 + container_name: admin-mariadb + ports: + - 3306:3306 + volumes: + - ./db/conf.d:/etc/mysql/conf.d + - ./db/data:/var/lib/mysql + - ./db/initdb.d:/docker-entrypoint-initdb.d + env_file: .env + environment: + TZ: UTC + networks: + - backend + restart: always + + +networks: + backend: diff --git a/docker/db-docker/config/consul_config.json b/docker/db-docker/config/consul_config.json new file mode 100644 index 0000000..2572d47 --- /dev/null +++ b/docker/db-docker/config/consul_config.json @@ -0,0 +1,5 @@ +{ + "Redis": "127.0.0.1:6379", + "Dynamodb": "http://localhost:8000", + "Kafka": "localhost:9092" +} diff --git a/docker/db-docker/docker-compose.yml b/docker/db-docker/docker-compose.yml new file mode 100644 index 0000000..5a40996 --- /dev/null +++ b/docker/db-docker/docker-compose.yml @@ -0,0 +1,26 @@ +version: '2' +services: + consul: + image: consul:latest + ports: + - "8500:8500" + + consulsetup: + image: consul:latest + depends_on: + - consul + restart: "no" + volumes: + - ./config/consul_config.json:/etc/consul_config.json + entrypoint: + ["sh", "-c", "curl --request PUT --data @/etc/consul_config.json http://consul:8500/v1/kv/config"] + + redis: + image: redis:latest + ports: + - "6379:6379" + + dynamodb: + image: amazon/dynamodb-local + ports: + - "8000:8000" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..9915b37 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,69 @@ +version: '4.29' +services: + + redis-master: + restart: always + image: redis:7.0.4 + command: "redis-server --requirepass KT-i5#i%-%LxKfZ5YJj6" + container_name: redis + volumes: + - "./redis_master:/home/redis_master/data" + ports: + - '6379:6379' + working_dir: /home/redis_master + + rabbitmq: + restart: always + image: 'rabbitmq:3-management-alpine' + container_name: rabbitmq-stream + ports: + - "5672:5672" + - "15672:15672" + environment: + RABBITMQ_ERLANG_COOKIE: "RabbitMQ-My-Cookies" + RABBITMQ_DEFAULT_USER: "admin" + RABBITMQ_DEFAULT_PASS: "admin" + + dynamodb-local: + restart: always + command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data" + image: amazon/dynamodb-local + container_name: dynamodb-local + ports: + - "8000:8000" + volumes: + - "./dynamodb:/home/dynamodblocal/data" + working_dir: /home/dynamodblocal + + dynamodb-admin: + restart: always + image: aaronshaf/dynamodb-admin + ports: + - "8001:8001" + environment: + DYNAMO_ENDPOINT: "http://dynamodb-local:8000" + AWS_REGION: "us-west-2" + AWS_ACCESS_KEY_ID: local + AWS_SECRET_ACCESS_KEY: local + depends_on: + - dynamodb-local + mongodb: + image: mongo + container_name: mongodb + restart: always + ports: + - 27017:27017 + volumes: + - ./mongodb_data:/data/db + environment: + - MONGO_INITDB_ROOT_USERNAME=root + - MONGO_INITDB_ROOT_PASSWORD=root + mongo-express: + image: mongo-express + restart: always + ports: + - 27117:8081 + environment: + ME_CONFIG_MONGODB_URL: mongodb://root:root@mongodb:27017 + depends_on: + - mongodb diff --git a/docker/dynamodb/shared-local-instance.db b/docker/dynamodb/shared-local-instance.db new file mode 100644 index 0000000..1e671d9 Binary files /dev/null and b/docker/dynamodb/shared-local-instance.db differ diff --git a/docker/dynamodb_memory/docker-compose.yml b/docker/dynamodb_memory/docker-compose.yml new file mode 100644 index 0000000..e229bc2 --- /dev/null +++ b/docker/dynamodb_memory/docker-compose.yml @@ -0,0 +1,33 @@ +version: '3.7' +services: + + redis-master: + image: redis:7.0.4 + command: "redis-server --requirepass KT-i5#i%-%LxKfZ5YJj6" + container_name: redis + volumes: + - "./redis_master:/home/redis_master/data" + ports: + - '6379:6379' + working_dir: /home/redis_master + + dynamodb: + command: "-jar DynamoDBLocal.jar -inMemory" + image: amazon/dynamodb-local:2.0.0 + container_name: dynamodb-local + ports: + - "8000:8000" + volumes: + - "./dynamodb:/home/dynamodblocal/data" + working_dir: /home/dynamodblocal + + rabbitmq: + image: 'rabbitmq:3-management-alpine' + container_name: rabbitmq-stream + ports: + - "5672:5672" + - "15672:15672" + environment: + RABBITMQ_ERLANG_COOKIE: "RabbitMQ-My-Cookies" + RABBITMQ_DEFAULT_USER: "admin" + RABBITMQ_DEFAULT_PASS: "admin" \ No newline at end of file diff --git a/docker/grafana-docker/LICENSE b/docker/grafana-docker/LICENSE new file mode 100644 index 0000000..9ac910d --- /dev/null +++ b/docker/grafana-docker/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2021 Benjamin Cremer + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docker/grafana-docker/README.md b/docker/grafana-docker/README.md new file mode 100644 index 0000000..9b0ff2c --- /dev/null +++ b/docker/grafana-docker/README.md @@ -0,0 +1,75 @@ +# Example Docker Compose project for Telegraf, InfluxDB and Grafana + +This an example project to show the TIG (Telegraf, InfluxDB and Grafana) stack. + +![Example Screenshot](./example.png?raw=true "Example Screenshot") + +## Start the stack with docker compose + +```bash +$ docker-compose up +``` + +## Services and Ports + +### Grafana +- URL: http://localhost:3000 +- User: admin +- Password: admin + +### Telegraf +- Port: 8125 UDP (StatsD input) + +### InfluxDB +- Port: 8086 (HTTP API) +- User: admin +- Password: admin +- Database: influx + + +Run the influx client: + +```bash +$ docker-compose exec influxdb influx -execute 'SHOW DATABASES' +``` + +Run the influx interactive console: + +```bash +$ docker-compose exec influxdb influx + +Connected to http://localhost:8086 version 1.8.0 +InfluxDB shell version: 1.8.0 +> +``` + +[Import data from a file with -import](https://docs.influxdata.com/influxdb/v1.8/tools/shell/#import-data-from-a-file-with-import) + +```bash +$ docker-compose exec -w /imports influxdb influx -import -path=data.txt -precision=s +``` + +## Run the PHP Example + +The PHP example generates random example metrics. The random metrics are beeing sent via UDP to the telegraf agent using the StatsD protocol. + +The telegraf agents aggregates the incoming data and perodically persists the data into the InfluxDB database. + +Grafana connects to the InfluxDB database and is able to visualize the incoming data. + +```bash +$ cd php-example +$ composer install +$ php example.php +Sending Random metrics. Use Ctrl+C to stop. +..........................^C +Runtime: 0.88382697105408 Seconds +Ops: 27 +Ops/s: 30.548965899738 +Killed by Ctrl+C +``` + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. + diff --git a/docker/grafana-docker/configuration.env b/docker/grafana-docker/configuration.env new file mode 100644 index 0000000..7da5a24 --- /dev/null +++ b/docker/grafana-docker/configuration.env @@ -0,0 +1,9 @@ +# Grafana options +GF_SECURITY_ADMIN_USER=admin +GF_SECURITY_ADMIN_PASSWORD=admin +GF_INSTALL_PLUGINS= + +# InfluxDB options +INFLUXDB_DB=influx +INFLUXDB_ADMIN_USER=admin +INFLUXDB_ADMIN_PASSWORD=admin diff --git a/docker/grafana-docker/docker-compose.yml b/docker/grafana-docker/docker-compose.yml new file mode 100644 index 0000000..b5c6a33 --- /dev/null +++ b/docker/grafana-docker/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3.6' +services: + telegraf: + image: telegraf:1.18-alpine + volumes: + - ./telegraf/etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro + depends_on: + - influxdb + links: + - influxdb + ports: + - '8125:8125/udp' + + influxdb: + image: influxdb:1.8-alpine + env_file: configuration.env + ports: + - '8086:8086' + volumes: + - ./:/imports + - influxdb_data:/var/lib/influxdb + + grafana: + image: grafana/grafana:8.0.2 + depends_on: + - influxdb + env_file: configuration.env + links: + - influxdb + ports: + - '3000:3000' + volumes: + - grafana_data:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + +volumes: + grafana_data: {} + influxdb_data: {} diff --git a/docker/grafana-docker/example.png b/docker/grafana-docker/example.png new file mode 100644 index 0000000..858c04a Binary files /dev/null and b/docker/grafana-docker/example.png differ diff --git a/docker/grafana-docker/grafana/dashboards/performance.json b/docker/grafana-docker/grafana/dashboards/performance.json new file mode 100644 index 0000000..407b763 --- /dev/null +++ b/docker/grafana-docker/grafana/dashboards/performance.json @@ -0,0 +1,373 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "object:7", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_type", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "type" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "performance_request_successful_time", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "90_percentile" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Request Time", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:237", + "decimals": null, + "format": "ms", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:238", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Request Type: $tag_type", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "type" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "performance_request_successful_count", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + " / $__interval_ms*1000" + ], + "type": "math" + } + ] + ], + "tags": [] + }, + { + "alias": "All Types", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + } + ], + "hide": false, + "measurement": "performance_request_successful_count", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + " / $__interval_ms*1000" + ], + "type": "math" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Requests per Second", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:126", + "format": "reqps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:127", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Performance", + "uid": "1Mar-DTiz", + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file diff --git a/docker/grafana-docker/grafana/provisioning/dashboards/all.yml b/docker/grafana-docker/grafana/provisioning/dashboards/all.yml new file mode 100644 index 0000000..0f62519 --- /dev/null +++ b/docker/grafana-docker/grafana/provisioning/dashboards/all.yml @@ -0,0 +1,11 @@ +apiVersion: 1 + +providers: +- name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + updateIntervalSeconds: 3 #how often Grafana will scan for changed dashboards + options: + path: /var/lib/grafana/dashboards diff --git a/docker/grafana-docker/grafana/provisioning/datasources/influxdb.yml b/docker/grafana-docker/grafana/provisioning/datasources/influxdb.yml new file mode 100644 index 0000000..8a254bf --- /dev/null +++ b/docker/grafana-docker/grafana/provisioning/datasources/influxdb.yml @@ -0,0 +1,46 @@ +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Influxdb + orgId: 1 + +# list of datasources to insert/update depending +# whats available in the database +datasources: + # name of the datasource. Required +- name: InfluxDB + # datasource type. Required + type: influxdb + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://influxdb:8086 + # database password, if used + password: "admin" + # database user, if used + user: "admin" + # database name, if used + database: "influx" + # enable/disable basic auth + basicAuth: false +# withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + timeInterval: "5s" +# graphiteVersion: "1.1" +# tlsAuth: false +# tlsAuthWithCACert: false +# # json object of data that will be encrypted. +# secureJsonData: +# tlsCACert: "..." +# tlsClientCert: "..." +# tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: false diff --git a/docker/grafana-docker/php-example/.gitignore b/docker/grafana-docker/php-example/.gitignore new file mode 100644 index 0000000..48b8bf9 --- /dev/null +++ b/docker/grafana-docker/php-example/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/docker/grafana-docker/php-example/composer.json b/docker/grafana-docker/php-example/composer.json new file mode 100644 index 0000000..eb64aad --- /dev/null +++ b/docker/grafana-docker/php-example/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "league/statsd": "^1.5", + "ext-pcntl": "*" + } +} diff --git a/docker/grafana-docker/php-example/composer.lock b/docker/grafana-docker/php-example/composer.lock new file mode 100644 index 0000000..ade40b5 --- /dev/null +++ b/docker/grafana-docker/php-example/composer.lock @@ -0,0 +1,79 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "54a6353042ab1f33202309a7a67786a2", + "packages": [ + { + "name": "league/statsd", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/statsd.git", + "reference": "c6290ef6c7528b7b739b26ce6aedf81ee6a4a2ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/statsd/zipball/c6290ef6c7528b7b739b26ce6aedf81ee6a4a2ac", + "reference": "c6290ef6c7528b7b739b26ce6aedf81ee6a4a2ac", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "League\\StatsD\\Laravel5\\Provider\\StatsdServiceProvider" + ], + "aliases": { + "Statsd": "League\\StatsD\\Laravel5\\Facade\\StatsdFacade" + } + } + }, + "autoload": { + "psr-4": { + "League\\StatsD\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc Qualie", + "email": "marc@marcqualie.com", + "homepage": "http://marcqualie.com", + "role": "Developer" + } + ], + "description": "A simple library for working with StatsD in PHP.", + "homepage": "https://github.com/thephpleague/statsd", + "keywords": [ + "graphite", + "library", + "statsd" + ], + "support": { + "issues": "https://github.com/thephpleague/statsd/issues", + "source": "https://github.com/thephpleague/statsd/tree/1.5.0" + }, + "time": "2018-10-09T16:02:46+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "ext-pcntl": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/docker/grafana-docker/php-example/example.php b/docker/grafana-docker/php-example/example.php new file mode 100644 index 0000000..2cbd5a0 --- /dev/null +++ b/docker/grafana-docker/php-example/example.php @@ -0,0 +1,48 @@ +configure([ + 'host' => '127.0.0.1', + 'port' => 8125, + 'namespace' => 'performance' +]); + +$ops = 0; +$requestsSent = 0; + +$startTime = microtime(true); + +pcntl_async_signals(true); +pcntl_signal(SIGINT, static function () use (&$ops, $startTime, &$requestsSent) { + $runtime = microtime(true) - $startTime; + $opsPerSecond = $ops / $runtime; + $requestsPerSecond = $requestsSent / $runtime; + echo PHP_EOL; + echo "Runtime:\t${runtime} Seconds\n"; + echo "Ops:\t\t${ops} \n"; + echo "Ops/s:\t\t${opsPerSecond} \n"; + echo "Requests Sent:\t${requestsSent} \n"; + echo "Requests/s:\t${requestsPerSecond} \n"; + echo "Killed by Ctrl+C\n"; + exit(0); +}); + +echo "Sending Random metrics. Use Ctrl+C to stop.\n"; +while (true) { + $time = random_int(100, 400); + $types = ['search', 'book', 'login', 'login']; + $type = $types[random_int(0 , 3)]; + $delta = random_int(1, 5); + + $statsd->increment('request.successful.count,type=' . $type, $delta); + $statsd->timing('request.successful.time,type=' . $type, $time); + + $requestsSent += $delta; + ++$ops; + + usleep(random_int(5, 55) * 1000); + echo '.'; +} diff --git a/docker/grafana-docker/telegraf/etc/telegraf.conf b/docker/grafana-docker/telegraf/etc/telegraf.conf new file mode 100644 index 0000000..dbfccf2 --- /dev/null +++ b/docker/grafana-docker/telegraf/etc/telegraf.conf @@ -0,0 +1,212 @@ +# Telegraf configuration + +# Telegraf is entirely plugin driven. All metrics are gathered from the +# declared inputs, and sent to the declared outputs. + +# Plugins must be declared in here to be active. +# To deactivate a plugin, comment out the name and any variables. + +# Use 'telegraf -config telegraf.conf -test' to see what metrics a config +# file would generate. + +# Global tags can be specified here in key="value" format. +[global_tags] + # dc = "us-east-1" # will tag all metrics with dc=us-east-1 + # rack = "1a" + +# Configuration for telegraf agent +[agent] + ## Default data collection interval for all inputs + interval = "5s" + ## Rounds collection interval to 'interval' + ## ie, if interval="10s" then always collect on :00, :10, :20, etc. + round_interval = true + + ## Telegraf will cache metric_buffer_limit metrics for each output, and will + ## flush this buffer on a successful write. + metric_buffer_limit = 10000 + ## Flush the buffer whenever full, regardless of flush_interval. + flush_buffer_when_full = true + + ## Collection jitter is used to jitter the collection by a random amount. + ## Each plugin will sleep for a random time within jitter before collecting. + ## This can be used to avoid many plugins querying things like sysfs at the + ## same time, which can have a measurable effect on the system. + collection_jitter = "0s" + + ## Default flushing interval for all outputs. You shouldn't set this below + ## interval. Maximum flush_interval will be flush_interval + flush_jitter + flush_interval = "1s" + ## Jitter the flush interval by a random amount. This is primarily to avoid + ## large write spikes for users running a large number of telegraf instances. + ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s + flush_jitter = "0s" + + ## Run telegraf in debug mode + debug = false + ## Run telegraf in quiet mode + quiet = false + ## Override default hostname, if empty use os.Hostname() + hostname = "" + + +############################################################################### +# OUTPUTS # +############################################################################### + +# Configuration for influxdb server to send metrics to +[[outputs.influxdb]] + # The full HTTP or UDP endpoint URL for your InfluxDB instance. + # Multiple urls can be specified but it is assumed that they are part of the same + # cluster, this means that only ONE of the urls will be written to each interval. + # urls = ["udp://localhost:8089"] # UDP endpoint example + urls = ["http://influxdb:8086"] # required + # The target database for metrics (telegraf will create it if not exists) + database = "influx" # required + # Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h". + # note: using second precision greatly helps InfluxDB compression + precision = "s" + + ## Write timeout (for the InfluxDB client), formatted as a string. + ## If not provided, will default to 5s. 0s means no timeout (not recommended). + timeout = "5s" + # username = "telegraf" + # password = "metricsmetricsmetricsmetrics" + # Set the user agent for HTTP POSTs (can be useful for log differentiation) + # user_agent = "telegraf" + # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) + # udp_payload = 512 + + +############################################################################### +# INPUTS # +############################################################################### +# Statsd Server +[[inputs.statsd]] + ## Protocol, must be "tcp", "udp4", "udp6" or "udp" (default=udp) + protocol = "udp" + + ## MaxTCPConnection - applicable when protocol is set to tcp (default=250) + max_tcp_connections = 250 + + ## Enable TCP keep alive probes (default=false) + tcp_keep_alive = false + + ## Specifies the keep-alive period for an active network connection. + ## Only applies to TCP sockets and will be ignored if tcp_keep_alive is false. + ## Defaults to the OS configuration. + # tcp_keep_alive_period = "2h" + + ## Address and port to host UDP listener on + service_address = ":8125" + + ## The following configuration options control when telegraf clears it's cache + ## of previous values. If set to false, then telegraf will only clear it's + ## cache when the daemon is restarted. + ## Reset gauges every interval (default=true) + delete_gauges = true + ## Reset counters every interval (default=true) + delete_counters = true + ## Reset sets every interval (default=true) + delete_sets = true + ## Reset timings & histograms every interval (default=true) + delete_timings = true + + ## Percentiles to calculate for timing & histogram stats + percentiles = [90] + + ## separator to use between elements of a statsd metric + metric_separator = "_" + + ## Parses tags in the datadog statsd format + ## http://docs.datadoghq.com/guides/dogstatsd/ + parse_data_dog_tags = false + + ## Statsd data translation templates, more info can be read here: + ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite + # templates = [ + # "cpu.* measurement*" + # ] + + ## Number of UDP messages allowed to queue up, once filled, + ## the statsd server will start dropping packets + allowed_pending_messages = 10000 + + ## Number of timing/histogram values to track per-measurement in the + ## calculation of percentiles. Raising this limit increases the accuracy + ## of percentiles but also increases the memory usage and cpu time. + percentile_limit = 1000 + + ## Maximum socket buffer size in bytes, once the buffer fills up, metrics + ## will start dropping. Defaults to the OS default. + # read_buffer_size = 65535 + +# Read metrics about cpu usage +[[inputs.cpu]] + ## Whether to report per-cpu stats or not + percpu = true + ## Whether to report total system cpu stats or not + totalcpu = true + ## Comment this line if you want the raw CPU time metrics + fielddrop = ["time_*"] + + +# Read metrics about disk usage by mount point +[[inputs.disk]] + ## By default, telegraf gather stats for all mountpoints. + ## Setting mountpoints will restrict the stats to the specified mountpoints. + # mount_points = ["/"] + + ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually + ## present on /run, /var/run, /dev/shm or /dev). + ignore_fs = ["tmpfs", "devtmpfs"] + + +# Read metrics about disk IO by device +[[inputs.diskio]] + ## By default, telegraf will gather stats for all devices including + ## disk partitions. + ## Setting devices will restrict the stats to the specified devices. + # devices = ["sda", "sdb"] + ## Uncomment the following line if you need disk serial numbers. + # skip_serial_number = false + + +# Get kernel statistics from /proc/stat +[[inputs.kernel]] + # no configuration + + +# Read metrics about memory usage +[[inputs.mem]] + # no configuration + + +# Get the number of processes and group them by status +[[inputs.processes]] + # no configuration + + +# Read metrics about swap memory usage +[[inputs.swap]] + # no configuration + + +# Read metrics about system load & uptime +[[inputs.system]] + # no configuration + +# Read metrics about network interface usage +[[inputs.net]] + # collect data only about specific interfaces + # interfaces = ["eth0"] + + +[[inputs.netstat]] + # no configuration + +[[inputs.interrupts]] + # no configuration + +[[inputs.linux_sysctl_fs]] + # no configuration diff --git a/docker/kafka-docker b/docker/kafka-docker new file mode 160000 index 0000000..a49ac63 --- /dev/null +++ b/docker/kafka-docker @@ -0,0 +1 @@ +Subproject commit a49ac63983188c7eadebfb69c131ae74d401e586 diff --git a/docker/logging/docker-compose.yml b/docker/logging/docker-compose.yml new file mode 100644 index 0000000..66f7da0 --- /dev/null +++ b/docker/logging/docker-compose.yml @@ -0,0 +1,43 @@ +version: '3.7' +services: + + mongodb: + restart: always + build: + context: ./mongodb/ + dockerfile: Dockerfile + container_name: devmongo + ports: + - "27017:27017" + volumes: + - ./mongodb/data:/data/db + - ./mongodb/init:/docker-entrypoint-initdb.d + command: --bind_ip_all + networks: + - logging + + fluentd: + image: fluent/fluentd:edge-debian + container_name: devfluentd + restart: always + user: root + command: > + /bin/sh -c " + apt-get update && + apt-get install -y build-essential ruby-dev && + gem install fluent-plugin-mongo --no-document && + apt-get remove -y build-essential ruby-dev && + apt-get autoremove -y && + exec fluentd -c /fluentd/etc/fluent.conf" + volumes: + - ./fluentd/conf:/fluentd/etc + - ../../bin/Debug/logs/archive/business:/fluentd/businesslogs + depends_on: + - mongodb + networks: + - logging + + +networks: + logging: + driver: bridge \ No newline at end of file diff --git a/docker/logging/fluentd/conf/fluent.conf b/docker/logging/fluentd/conf/fluent.conf new file mode 100644 index 0000000..8ea3cd8 --- /dev/null +++ b/docker/logging/fluentd/conf/fluent.conf @@ -0,0 +1,23 @@ + + @type mongo + host mongodb + port 27017 + database LogDB + collection Log + + flush_interval 5s + + + + + + + @type tail + path /fluentd/businesslogs/*.json + pos_file /var/log/td-agent/serverlog.pos + + @type json + + tag mongo.server.log + + diff --git a/docker/logging/mongodb/Dockerfile b/docker/logging/mongodb/Dockerfile new file mode 100644 index 0000000..0afa253 --- /dev/null +++ b/docker/logging/mongodb/Dockerfile @@ -0,0 +1,10 @@ +# Dockerfile + +# 공식 MongoDB 이미지 사용 +FROM mongo:latest + +# MongoDB 클라이언트 설치 +RUN apt-get install -y mongodb-org-shell && rm -rf /var/lib/apt/lists/* + +# 컨테이너 시작시 MongoDB 클라이언트 도구를 사용하여 스크립트 실행 +CMD mongosh localhost:27017/LogDB /docker-entrypoint-initdb.d/init-mongo.js \ No newline at end of file diff --git a/docker/logging/mongodb/init/init-mongo.js b/docker/logging/mongodb/init/init-mongo.js new file mode 100644 index 0000000..33ba4e7 --- /dev/null +++ b/docker/logging/mongodb/init/init-mongo.js @@ -0,0 +1,2 @@ +db = db.getSiblingDB('LogDB'); +db.createCollection('Log'); diff --git a/docker/logging/실행전주의사항.txt b/docker/logging/실행전주의사항.txt new file mode 100644 index 0000000..1b81adb --- /dev/null +++ b/docker/logging/실행전주의사항.txt @@ -0,0 +1,19 @@ +해당 도커는 Local, Dev 환경에서 사용하기 위한 설정 +Local, Dev 환경에서 MongoDB, FluentD가 필요할경우 설치 진행 + + + +Fluentd 가 로그파일을 MongoDB로 전송하기 위해 docker-compose.yml 의 Fluentd Volume 정보를 해당 서버 경로 에 맞게 수정해줘야 한다. + +docker-compose.yml 파일 실행 경로를 기준으로 로그파일 저장되어 있는 폴더를 상대 경로로 지정 + +예시 : + +volumes: + - ./fluentd/conf:/fluentd/etc + - ../../bin/Debug/logs/archive/business:/fluentd/businesslogs + +위 ./../bin/Debug/logs/archive/business: 라고 되어 있는 경로가 로그파일이 존재하는 경로 + + +다른내용은 바꾸지 않는다. diff --git a/docker/mongodb_data/.mongodb/mongosh/66b1ebbe1d8e001b3d149f47_log b/docker/mongodb_data/.mongodb/mongosh/66b1ebbe1d8e001b3d149f47_log new file mode 100644 index 0000000..a231e6e --- /dev/null +++ b/docker/mongodb_data/.mongodb/mongosh/66b1ebbe1d8e001b3d149f47_log @@ -0,0 +1,5 @@ +{"t":{"$date":"2024-08-06T09:24:14.020Z"},"s":"I","c":"MONGOSH","id":1000000000,"ctx":"log","msg":"Starting log","attr":{"execPath":"/usr/bin/mongosh","envInfo":{"EDITOR":null,"NODE_OPTIONS":null,"TERM":null},"version":"2.2.10","distributionKind":"compiled","buildArch":"x64","buildPlatform":"linux","buildTarget":"linux-x64","buildTime":"2024-06-21T23:08:14.280Z","gitVersion":"cf5fc49a73529188a17387e80d9e88b1d9eb904a","nodeVersion":"v20.12.2","opensslVersion":"3.0.13+quic","sharedOpenssl":false,"runtimeArch":"x64","runtimePlatform":"linux","runtimeGlibcVersion":"2.35","deps":{"nodeDriverVersion":"6.7.0","libmongocryptVersion":"1.9.0-20230828+git8e7f69f1c0","libmongocryptNodeBindingsVersion":"6.0.0","kerberosVersion":"2.1.0"}}} +{"t":{"$date":"2024-08-06T09:24:14.027Z"},"s":"I","c":"MONGOSH","id":1000000048,"ctx":"config","msg":"Loading global configuration file","attr":{"filename":"/etc/mongosh.conf","found":false}} +{"t":{"$date":"2024-08-06T09:24:14.044Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000042,"ctx":"mongosh-connect","msg":"Initiating connection attempt","attr":{"uri":"mongodb://127.0.0.1:27017/admin?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.10","driver":{"name":"nodejs|mongosh","version":"6.7.0|2.2.10"},"devtoolsConnectVersion":"3.0.1","host":"127.0.0.1:27017"}} +{"t":{"$date":"2024-08-06T09:24:14.049Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000035,"ctx":"mongosh-connect","msg":"Server heartbeat succeeded","attr":{"connectionId":"127.0.0.1:27017"}} +{"t":{"$date":"2024-08-06T09:24:14.095Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000037,"ctx":"mongosh-connect","msg":"Connection attempt finished"} diff --git a/docker/mongodb_data/.mongodb/mongosh/66b1ebbea3ca52a795149f47_log b/docker/mongodb_data/.mongodb/mongosh/66b1ebbea3ca52a795149f47_log new file mode 100644 index 0000000..8cdbd81 --- /dev/null +++ b/docker/mongodb_data/.mongodb/mongosh/66b1ebbea3ca52a795149f47_log @@ -0,0 +1,14 @@ +{"t":{"$date":"2024-08-06T09:24:14.238Z"},"s":"I","c":"MONGOSH","id":1000000000,"ctx":"log","msg":"Starting log","attr":{"execPath":"/usr/bin/mongosh","envInfo":{"EDITOR":null,"NODE_OPTIONS":null,"TERM":null},"version":"2.2.10","distributionKind":"compiled","buildArch":"x64","buildPlatform":"linux","buildTarget":"linux-x64","buildTime":"2024-06-21T23:08:14.280Z","gitVersion":"cf5fc49a73529188a17387e80d9e88b1d9eb904a","nodeVersion":"v20.12.2","opensslVersion":"3.0.13+quic","sharedOpenssl":false,"runtimeArch":"x64","runtimePlatform":"linux","runtimeGlibcVersion":"2.35","deps":{"nodeDriverVersion":"6.7.0","libmongocryptVersion":"1.9.0-20230828+git8e7f69f1c0","libmongocryptNodeBindingsVersion":"6.0.0","kerberosVersion":"2.1.0"}}} +{"t":{"$date":"2024-08-06T09:24:14.244Z"},"s":"I","c":"MONGOSH","id":1000000005,"ctx":"config","msg":"User updated"} +{"t":{"$date":"2024-08-06T09:24:14.244Z"},"s":"I","c":"MONGOSH","id":1000000048,"ctx":"config","msg":"Loading global configuration file","attr":{"filename":"/etc/mongosh.conf","found":false}} +{"t":{"$date":"2024-08-06T09:24:14.261Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000042,"ctx":"mongosh-connect","msg":"Initiating connection attempt","attr":{"uri":"mongodb://127.0.0.1:27017/admin?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.10","driver":{"name":"nodejs|mongosh","version":"6.7.0|2.2.10"},"devtoolsConnectVersion":"3.0.1","host":"127.0.0.1:27017"}} +{"t":{"$date":"2024-08-06T09:24:14.265Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000035,"ctx":"mongosh-connect","msg":"Server heartbeat succeeded","attr":{"connectionId":"127.0.0.1:27017"}} +{"t":{"$date":"2024-08-06T09:24:14.294Z"},"s":"I","c":"DEVTOOLS-CONNECT","id":1000000037,"ctx":"mongosh-connect","msg":"Connection attempt finished"} +{"t":{"$date":"2024-08-06T09:24:14.305Z"},"s":"I","c":"MONGOSH","id":1000000004,"ctx":"connect","msg":"Connecting to server","attr":{"session_id":"66b1ebbea3ca52a795149f47","userId":null,"telemetryAnonymousId":"66b1ebbe1d8e001b3d149f46","connectionUri":"mongodb://:27017/admin?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.10","is_atlas":false,"is_localhost":true,"is_do":false,"server_version":"7.0.12","node_version":"v20.12.2","mongosh_version":"2.2.10","server_os":"linux","server_arch":"x86_64","is_enterprise":false,"auth_type":null,"is_data_federation":false,"is_stream":false,"dl_version":null,"atlas_version":null,"is_genuine":true,"non_genuine_server_name":"mongodb","is_local_atlas":false,"fcv":"7.0","api_version":null,"api_strict":null,"api_deprecation_errors":null}} +{"t":{"$date":"2024-08-06T09:24:14.306Z"},"s":"I","c":"MONGOSH","id":1000000010,"ctx":"shell-api","msg":"Initialized context","attr":{"method":"setCtx","arguments":{}}} +{"t":{"$date":"2024-08-06T09:24:14.308Z"},"s":"I","c":"MONGOSH-SNIPPETS","id":1000000024,"ctx":"snippets","msg":"Fetching snippet index","attr":{"refreshMode":"allow-cached"}} +{"t":{"$date":"2024-08-06T09:24:14.308Z"},"s":"I","c":"MONGOSH-SNIPPETS","id":1000000019,"ctx":"snippets","msg":"Loaded snippets","attr":{"installdir":"/data/db/.mongodb/mongosh/snippets"}} +{"t":{"$date":"2024-08-06T09:24:14.309Z"},"s":"I","c":"MONGOSH-SNIPPETS","id":1000000028,"ctx":"snippets","msg":"Modifying snippets package.json failed","attr":{"error":"ENOENT: no such file or directory, open '/data/db/.mongodb/mongosh/snippets/package.json'"}} +{"t":{"$date":"2024-08-06T09:24:14.340Z"},"s":"I","c":"MONGOSH","id":1000000002,"ctx":"repl","msg":"Started REPL","attr":{"version":"2.2.10"}} +{"t":{"$date":"2024-08-06T09:24:14.418Z"},"s":"I","c":"MONGOSH","id":1000000011,"ctx":"shell-api","msg":"Performed API call","attr":{"method":"createUser","class":"Database","db":"admin","arguments":{}}} +{"t":{"$date":"2024-08-06T09:24:14.464Z"},"s":"I","c":"MONGOSH","id":1000000045,"ctx":"analytics","msg":"Flushed outstanding data","attr":{"flushError":"Trying to persist throttle state before userId is set","flushDuration":0}} diff --git a/docker/mongodb_data/.mongodb/mongosh/config b/docker/mongodb_data/.mongodb/mongosh/config new file mode 100644 index 0000000..1067e34 --- /dev/null +++ b/docker/mongodb_data/.mongodb/mongosh/config @@ -0,0 +1 @@ +{"userId":"66b1ebbe1d8e001b3d149f46","telemetryAnonymousId":"66b1ebbe1d8e001b3d149f46","enableTelemetry":true} \ No newline at end of file diff --git a/docker/mongodb_data/.mongodb/mongosh/mongosh_repl_history b/docker/mongodb_data/.mongodb/mongosh/mongosh_repl_history new file mode 100644 index 0000000..e69de29 diff --git a/docker/mongodb_data/.mongodb/mongosh/snippets/package.json b/docker/mongodb_data/.mongodb/mongosh/snippets/package.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/docker/mongodb_data/.mongodb/mongosh/snippets/package.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/docker/mongodb_data/WiredTiger b/docker/mongodb_data/WiredTiger new file mode 100644 index 0000000..1bc57ba --- /dev/null +++ b/docker/mongodb_data/WiredTiger @@ -0,0 +1,2 @@ +WiredTiger +WiredTiger 11.2.0: (November 10, 2022) diff --git a/docker/mongodb_data/WiredTiger.lock b/docker/mongodb_data/WiredTiger.lock new file mode 100644 index 0000000..3d84206 --- /dev/null +++ b/docker/mongodb_data/WiredTiger.lock @@ -0,0 +1 @@ +WiredTiger lock file diff --git a/docker/mongodb_data/WiredTiger.turtle b/docker/mongodb_data/WiredTiger.turtle new file mode 100644 index 0000000..b61b022 --- /dev/null +++ b/docker/mongodb_data/WiredTiger.turtle @@ -0,0 +1,6 @@ +WiredTiger version string +WiredTiger 11.2.0: (November 10, 2022) +WiredTiger version +major=11,minor=2,patch=0 +file:WiredTiger.wt +access_pattern_hint=none,allocation_size=4KB,app_metadata=,assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none,write_timestamp=off),block_allocation=best,block_compressor=,cache_resident=false,checksum=on,collator=,columns=,dictionary=0,encryption=(keyid=,name=),format=btree,huffman_key=,huffman_value=,id=0,ignore_in_memory_cache_size=false,internal_item_max=0,internal_key_max=0,internal_key_truncate=true,internal_page_max=4KB,key_format=S,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=0,log=(enabled=true),memory_page_image_max=0,memory_page_max=5MB,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=false,prefix_compression_min=4,readonly=false,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,tiered_object=false,tiered_storage=(auth_token=,bucket=,bucket_prefix=,cache_directory=,local_retention=300,name=,object_target_size=0),value_format=S,verbose=[],version=(major=1,minor=1),write_timestamp_usage=none,checkpoint=(WiredTigerCheckpoint.111272=(addr="018981e408c2074e8a81e4a3c69f3e8b81e45bb8c71f808080e3010fc0e23fc0",order=111272,time=1730100331,size=28672,newest_start_durable_ts=0,oldest_start_ts=0,newest_txn=8630,newest_stop_durable_ts=0,newest_stop_ts=-1,newest_stop_txn=-11,prepare=0,write_gen=333811,run_write_gen=307961)),checkpoint_backup_info=,checkpoint_lsn=(22,6628736) diff --git a/docker/mongodb_data/WiredTiger.wt b/docker/mongodb_data/WiredTiger.wt new file mode 100644 index 0000000..21eeeee Binary files /dev/null and b/docker/mongodb_data/WiredTiger.wt differ diff --git a/docker/mongodb_data/WiredTigerHS.wt b/docker/mongodb_data/WiredTigerHS.wt new file mode 100644 index 0000000..3f019cb Binary files /dev/null and b/docker/mongodb_data/WiredTigerHS.wt differ diff --git a/docker/mongodb_data/_mdb_catalog.wt b/docker/mongodb_data/_mdb_catalog.wt new file mode 100644 index 0000000..cbbc18b Binary files /dev/null and b/docker/mongodb_data/_mdb_catalog.wt differ diff --git a/docker/mongodb_data/collection-0-9066982159787037530.wt b/docker/mongodb_data/collection-0-9066982159787037530.wt new file mode 100644 index 0000000..0aece7f Binary files /dev/null and b/docker/mongodb_data/collection-0-9066982159787037530.wt differ diff --git a/docker/mongodb_data/collection-2-9066982159787037530.wt b/docker/mongodb_data/collection-2-9066982159787037530.wt new file mode 100644 index 0000000..9c9d8bf Binary files /dev/null and b/docker/mongodb_data/collection-2-9066982159787037530.wt differ diff --git a/docker/mongodb_data/collection-4-9066982159787037530.wt b/docker/mongodb_data/collection-4-9066982159787037530.wt new file mode 100644 index 0000000..a3c5555 Binary files /dev/null and b/docker/mongodb_data/collection-4-9066982159787037530.wt differ diff --git a/docker/mongodb_data/collection-7-9066982159787037530.wt b/docker/mongodb_data/collection-7-9066982159787037530.wt new file mode 100644 index 0000000..3e8cc9a Binary files /dev/null and b/docker/mongodb_data/collection-7-9066982159787037530.wt differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-09-26T17-30-41Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-09-26T17-30-41Z-00000 new file mode 100644 index 0000000..ae47e6b Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-09-26T17-30-41Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T03-08-41Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T03-08-41Z-00000 new file mode 100644 index 0000000..f5dc5a1 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T03-08-41Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T09-28-16Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T09-28-16Z-00000 new file mode 100644 index 0000000..cd62d68 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-09-27T09-28-16Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-09-28T20-43-15Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-09-28T20-43-15Z-00000 new file mode 100644 index 0000000..d04218d Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-09-28T20-43-15Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-09-30T07-53-16Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-09-30T07-53-16Z-00000 new file mode 100644 index 0000000..a9ab4c1 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-09-30T07-53-16Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-01T18-48-17Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-01T18-48-17Z-00000 new file mode 100644 index 0000000..181202a Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-01T18-48-17Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-03T06-03-17Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-03T06-03-17Z-00000 new file mode 100644 index 0000000..1f2d1e2 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-03T06-03-17Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-07T02-07-06Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-07T02-07-06Z-00000 new file mode 100644 index 0000000..c9dfb3e Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-07T02-07-06Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-08T13-08-04Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-08T13-08-04Z-00000 new file mode 100644 index 0000000..4875fca Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-08T13-08-04Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-10T00-18-04Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-10T00-18-04Z-00000 new file mode 100644 index 0000000..165de1d Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-10T00-18-04Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-11T11-28-04Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-11T11-28-04Z-00000 new file mode 100644 index 0000000..46fc1d8 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-11T11-28-04Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-12T22-48-04Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-12T22-48-04Z-00000 new file mode 100644 index 0000000..775ec7b Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-12T22-48-04Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-14T09-58-06Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-14T09-58-06Z-00000 new file mode 100644 index 0000000..6668721 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-14T09-58-06Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-15T21-08-06Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-15T21-08-06Z-00000 new file mode 100644 index 0000000..5bf3792 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-15T21-08-06Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-17T08-18-06Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-17T08-18-06Z-00000 new file mode 100644 index 0000000..d9cc7a5 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-17T08-18-06Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-18T19-18-07Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-18T19-18-07Z-00000 new file mode 100644 index 0000000..e137923 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-18T19-18-07Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-20T06-28-08Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-20T06-28-08Z-00000 new file mode 100644 index 0000000..ed082fa Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-20T06-28-08Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-21T17-33-08Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-21T17-33-08Z-00000 new file mode 100644 index 0000000..412791b Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-21T17-33-08Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-11-58Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-11-58Z-00000 new file mode 100644 index 0000000..946b44a Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-11-58Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-31-02Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-31-02Z-00000 new file mode 100644 index 0000000..7bcc3c5 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-31-02Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-46-00Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-46-00Z-00000 new file mode 100644 index 0000000..efe5fc3 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-22T07-46-00Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-23T18-55-59Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-23T18-55-59Z-00000 new file mode 100644 index 0000000..4d3a120 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-23T18-55-59Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-25T06-01-00Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-25T06-01-00Z-00000 new file mode 100644 index 0000000..0e1803c Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-25T06-01-00Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-26T16-31-01Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-26T16-31-01Z-00000 new file mode 100644 index 0000000..4a54bcb Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-26T16-31-01Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.2024-10-28T03-11-01Z-00000 b/docker/mongodb_data/diagnostic.data/metrics.2024-10-28T03-11-01Z-00000 new file mode 100644 index 0000000..c03b481 Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.2024-10-28T03-11-01Z-00000 differ diff --git a/docker/mongodb_data/diagnostic.data/metrics.interim b/docker/mongodb_data/diagnostic.data/metrics.interim new file mode 100644 index 0000000..b5e106a Binary files /dev/null and b/docker/mongodb_data/diagnostic.data/metrics.interim differ diff --git a/docker/mongodb_data/index-1-9066982159787037530.wt b/docker/mongodb_data/index-1-9066982159787037530.wt new file mode 100644 index 0000000..fa5f89f Binary files /dev/null and b/docker/mongodb_data/index-1-9066982159787037530.wt differ diff --git a/docker/mongodb_data/index-3-9066982159787037530.wt b/docker/mongodb_data/index-3-9066982159787037530.wt new file mode 100644 index 0000000..3f4c90e Binary files /dev/null and b/docker/mongodb_data/index-3-9066982159787037530.wt differ diff --git a/docker/mongodb_data/index-5-9066982159787037530.wt b/docker/mongodb_data/index-5-9066982159787037530.wt new file mode 100644 index 0000000..0df5945 Binary files /dev/null and b/docker/mongodb_data/index-5-9066982159787037530.wt differ diff --git a/docker/mongodb_data/index-6-9066982159787037530.wt b/docker/mongodb_data/index-6-9066982159787037530.wt new file mode 100644 index 0000000..2053340 Binary files /dev/null and b/docker/mongodb_data/index-6-9066982159787037530.wt differ diff --git a/docker/mongodb_data/index-8-9066982159787037530.wt b/docker/mongodb_data/index-8-9066982159787037530.wt new file mode 100644 index 0000000..0f36efc Binary files /dev/null and b/docker/mongodb_data/index-8-9066982159787037530.wt differ diff --git a/docker/mongodb_data/index-9-9066982159787037530.wt b/docker/mongodb_data/index-9-9066982159787037530.wt new file mode 100644 index 0000000..eab95ae Binary files /dev/null and b/docker/mongodb_data/index-9-9066982159787037530.wt differ diff --git a/docker/mongodb_data/journal/WiredTigerLog.0000000022 b/docker/mongodb_data/journal/WiredTigerLog.0000000022 new file mode 100644 index 0000000..2110c7f Binary files /dev/null and b/docker/mongodb_data/journal/WiredTigerLog.0000000022 differ diff --git a/docker/mongodb_data/journal/WiredTigerPreplog.0000000001 b/docker/mongodb_data/journal/WiredTigerPreplog.0000000001 new file mode 100644 index 0000000..aa52a21 Binary files /dev/null and b/docker/mongodb_data/journal/WiredTigerPreplog.0000000001 differ diff --git a/docker/mongodb_data/journal/WiredTigerPreplog.0000000002 b/docker/mongodb_data/journal/WiredTigerPreplog.0000000002 new file mode 100644 index 0000000..aa52a21 Binary files /dev/null and b/docker/mongodb_data/journal/WiredTigerPreplog.0000000002 differ diff --git a/docker/mongodb_data/mongod.lock b/docker/mongodb_data/mongod.lock new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/docker/mongodb_data/mongod.lock @@ -0,0 +1 @@ +1 diff --git a/docker/mongodb_data/sizeStorer.wt b/docker/mongodb_data/sizeStorer.wt new file mode 100644 index 0000000..8902604 Binary files /dev/null and b/docker/mongodb_data/sizeStorer.wt differ diff --git a/docker/mongodb_data/storage.bson b/docker/mongodb_data/storage.bson new file mode 100644 index 0000000..276b694 Binary files /dev/null and b/docker/mongodb_data/storage.bson differ diff --git a/docker/opensearch/docker-compose.yml b/docker/opensearch/docker-compose.yml new file mode 100644 index 0000000..c4f4a0b --- /dev/null +++ b/docker/opensearch/docker-compose.yml @@ -0,0 +1,73 @@ +version: '3' +services: + opensearch-node1: + image: opensearchproject/opensearch:latest + container_name: opensearch-node1 + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch-node1 + - discovery.seed_hosts=opensearch-node1,opensearch-node2 + - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 + - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems + hard: 65536 + volumes: + - opensearch-data1:/usr/share/opensearch/data + ports: + - 9200:9200 + - 9600:9600 # required for Performance Analyzer + networks: + - opensearch-net + opensearch-node2: + image: opensearchproject/opensearch:latest + container_name: opensearch-node2 + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch-node2 + - discovery.seed_hosts=opensearch-node1,opensearch-node2 + - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 + - bootstrap.memory_lock=true + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + volumes: + - opensearch-data2:/usr/share/opensearch/data + networks: + - opensearch-net + opensearch-dashboards: + image: opensearchproject/opensearch-dashboards:latest + container_name: opensearch-dashboards + ports: + - 5601:5601 + expose: + - "5601" + environment: + OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]' + networks: + - opensearch-net + filebeat: + image: docker.elastic.co/beats/filebeat:7.16.3 + user: root + volumes: + - ./filebeat.yml:/usr/share/filebeat/filebeat.yml:ro + - /var/lib/docker/containers:/var/lib/docker/containers:ro + networks: + - elk + +volumes: + opensearch-data1: + opensearch-data2: + +networks: + opensearch-net: diff --git a/docker/opensearch/single-node/docker-compose.yml b/docker/opensearch/single-node/docker-compose.yml new file mode 100644 index 0000000..5a3481f --- /dev/null +++ b/docker/opensearch/single-node/docker-compose.yml @@ -0,0 +1,43 @@ +version: '3' +services: + opensearch-node1: + image: opensearchproject/opensearch:latest + container_name: opensearch-node1 + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch-node1 + - discovery.seed_hosts=opensearch-node1 + - discovery.type=single-node + - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems + hard: 65536 + volumes: + - opensearch-data1:/usr/share/opensearch/data + ports: + - 9200:9200 + - 9600:9600 # required for Performance Analyzer + networks: + - opensearch-net + opensearch-dashboards: + image: opensearchproject/opensearch-dashboards:latest + container_name: opensearch-dashboards + ports: + - 5601:5601 + expose: + - "5601" + environment: + OPENSEARCH_HOSTS: '["https://opensearch-node1:9200"]' + networks: + - opensearch-net + +volumes: + opensearch-data1: + +networks: + opensearch-net: diff --git a/docker/rabbitmq/docker-compose.yml b/docker/rabbitmq/docker-compose.yml new file mode 100644 index 0000000..cb925aa --- /dev/null +++ b/docker/rabbitmq/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' +services: + rabbitmq: + image: 'rabbitmq:3-management-alpine' + container_name: rabbitmq-stream + ports: + - "5672:5672" + - "15672:15672" + environment: + RABBITMQ_ERLANG_COOKIE: "RabbitMQ-My-Cookies" + RABBITMQ_DEFAULT_USER: "admin" + RABBITMQ_DEFAULT_PASS: "admin" diff --git a/docker/readme.txt b/docker/readme.txt new file mode 100644 index 0000000..b4cb389 --- /dev/null +++ b/docker/readme.txt @@ -0,0 +1,49 @@ +docker-compose up -d + + +================================ +이하 레거시 +================================= +# consul ui +http://127.0.0.1:8500/ + +# dynamodb +http://localhost:8000 + +# redis +127.0.0.1:6379 + +# kafka ui +http://127.0.0.1:9000/ + +# kafka BootstrapServer +localhost:9092 + +# grafana +http://127.0.0.1:3000/ + + + +############################## +Yikes! KeeperErrorCode = Unimplemented for /kafka-manager/mutex Try again. +kafka-manager 에러 발생 시 + + +zookeeper 에 접속한 뒤 ./bin/zkCli.sh 로 주키퍼 클라이언트 실행 후 아래와 같이 /kafka-manager 경로에 3개 폴더 생성 + +# docker exec -it my-zookeeper /bin/bash +root@ec5ea8a1e52b:/opt/zookeeper-3.4.13# ./bin/zkCli.sh +... +[zk: localhost:2181(CONNECTED) 0] ls /kafka-manager +[configs, clusters, deleteClusters] +[zk: localhost:2181(CONNECTED) 1] create /kafka-manager/mutex "" +Created /kafka-manager/mutex +[zk: localhost:2181(CONNECTED) 2] create /kafka-manager/mutex/locks "" +Created /kafka-manager/mutex/locks +[zk: localhost:2181(CONNECTED) 3] create /kafka-manager/mutex/leases "" +Created /kafka-manager/mutex/leases + + + +############################## + diff --git a/docker/redis-master-slave.yml b/docker/redis-master-slave.yml new file mode 100644 index 0000000..cc1d28a --- /dev/null +++ b/docker/redis-master-slave.yml @@ -0,0 +1,22 @@ +version: '3.7' +services: + redis-master: + image: redis:latest + hostname: redis-master + volumes: + - redis_master:/data + ports: + - '6379:6379' + + redis-slave: + image: redis:latest + hostname: redis-slave + volumes: + - redis_slave:/data + ports: + - '6479:6479' + command: redis-server --slaveof redis-master 6379 + +volumes: + redis_master: + redis_slave: \ No newline at end of file diff --git a/docker/redis_master/redis.conf b/docker/redis_master/redis.conf new file mode 100644 index 0000000..ebe2d82 --- /dev/null +++ b/docker/redis_master/redis.conf @@ -0,0 +1,2276 @@ +# Redis configuration file example. +# +# Note that in order to read the configuration file, Redis must be +# started with the file path as first argument: +# +# ./redis-server /path/to/redis.conf + +# Note on units: when memory size is needed, it is possible to specify +# it in the usual form of 1k 5GB 4M and so forth: +# +# 1k => 1000 bytes +# 1kb => 1024 bytes +# 1m => 1000000 bytes +# 1mb => 1024*1024 bytes +# 1g => 1000000000 bytes +# 1gb => 1024*1024*1024 bytes +# +# units are case insensitive so 1GB 1Gb 1gB are all the same. + +################################## INCLUDES ################################### + +# Include one or more other config files here. This is useful if you +# have a standard template that goes to all Redis servers but also need +# to customize a few per-server settings. Include files can include +# other files, so use this wisely. +# +# Note that option "include" won't be rewritten by command "CONFIG REWRITE" +# from admin or Redis Sentinel. Since Redis always uses the last processed +# line as value of a configuration directive, you'd better put includes +# at the beginning of this file to avoid overwriting config change at runtime. +# +# If instead you are interested in using includes to override configuration +# options, it is better to use include as the last line. +# +# Included paths may contain wildcards. All files matching the wildcards will +# be included in alphabetical order. +# Note that if an include path contains a wildcards but no files match it when +# the server is started, the include statement will be ignored and no error will +# be emitted. It is safe, therefore, to include wildcard files from empty +# directories. +# +# include /path/to/local.conf +# include /path/to/other.conf +# include /path/to/fragments/*.conf +# + +################################## MODULES ##################################### + +# Load modules at startup. If the server is not able to load modules +# it will abort. It is possible to use multiple loadmodule directives. +# +# loadmodule /path/to/my_module.so +# loadmodule /path/to/other_module.so + +################################## NETWORK ##################################### + +# By default, if no "bind" configuration directive is specified, Redis listens +# for connections from all available network interfaces on the host machine. +# It is possible to listen to just one or multiple selected interfaces using +# the "bind" configuration directive, followed by one or more IP addresses. +# Each address can be prefixed by "-", which means that redis will not fail to +# start if the address is not available. Being not available only refers to +# addresses that does not correspond to any network interface. Addresses that +# are already in use will always fail, and unsupported protocols will always BE +# silently skipped. +# +# Examples: +# +# bind 192.168.1.100 10.0.0.1 # listens on two specific IPv4 addresses +# bind 127.0.0.1 ::1 # listens on loopback IPv4 and IPv6 +# bind * -::* # like the default, all available interfaces +# +# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the +# internet, binding to all the interfaces is dangerous and will expose the +# instance to everybody on the internet. So by default we uncomment the +# following bind directive, that will force Redis to listen only on the +# IPv4 and IPv6 (if available) loopback interface addresses (this means Redis +# will only be able to accept client connections from the same host that it is +# running on). +# +# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES +# COMMENT OUT THE FOLLOWING LINE. +# +# You will also need to set a password unless you explicitly disable protected +# mode. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +bind * -::* + +# By default, outgoing connections (from replica to master, from Sentinel to +# instances, cluster bus, etc.) are not bound to a specific local address. In +# most cases, this means the operating system will handle that based on routing +# and the interface through which the connection goes out. +# +# Using bind-source-addr it is possible to configure a specific address to bind +# to, which may also affect how the connection gets routed. +# +# Example: +# +# bind-source-addr 10.0.0.1 + +# Protected mode is a layer of security protection, in order to avoid that +# Redis instances left open on the internet are accessed and exploited. +# +# When protected mode is on and the default user has no password, the server +# only accepts local connections from the IPv4 address (127.0.0.1), IPv6 address +# (::1) or Unix domain sockets. +# +# By default protected mode is enabled. You should disable it only if +# you are sure you want clients from other hosts to connect to Redis +# even if no authentication is configured. +protected-mode yes + +# Redis uses default hardened security configuration directives to reduce the +# attack surface on innocent users. Therefore, several sensitive configuration +# directives are immutable, and some potentially-dangerous commands are blocked. +# +# Configuration directives that control files that Redis writes to (e.g., 'dir' +# and 'dbfilename') and that aren't usually modified during runtime +# are protected by making them immutable. +# +# Commands that can increase the attack surface of Redis and that aren't usually +# called by users are blocked by default. +# +# These can be exposed to either all connections or just local ones by setting +# each of the configs listed below to either of these values: +# +# no - Block for any connection (remain immutable) +# yes - Allow for any connection (no protection) +# local - Allow only for local connections. Ones originating from the +# IPv4 address (127.0.0.1), IPv6 address (::1) or Unix domain sockets. +# +# enable-protected-configs no +enable-debug-command yes +# enable-module-command no + +# Accept connections on the specified port, default is 6379 (IANA #815344). +# If port 0 is specified Redis will not listen on a TCP socket. +port 6379 + +# TCP listen() backlog. +# +# In high requests-per-second environments you need a high backlog in order +# to avoid slow clients connection issues. Note that the Linux kernel +# will silently truncate it to the value of /proc/sys/net/core/somaxconn so +# make sure to raise both the value of somaxconn and tcp_max_syn_backlog +# in order to get the desired effect. +tcp-backlog 511 + +# Unix socket. +# +# Specify the path for the Unix socket that will be used to listen for +# incoming connections. There is no default, so Redis will not listen +# on a unix socket when not specified. +# +# unixsocket /run/redis.sock +# unixsocketperm 700 + +# Close the connection after a client is idle for N seconds (0 to disable) +timeout 0 + +# TCP keepalive. +# +# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence +# of communication. This is useful for two reasons: +# +# 1) Detect dead peers. +# 2) Force network equipment in the middle to consider the connection to be +# alive. +# +# On Linux, the specified value (in seconds) is the period used to send ACKs. +# Note that to close the connection the double of the time is needed. +# On other kernels the period depends on the kernel configuration. +# +# A reasonable value for this option is 300 seconds, which is the new +# Redis default starting with Redis 3.2.1. +tcp-keepalive 300 + +# Apply OS-specific mechanism to mark the listening socket with the specified +# ID, to support advanced routing and filtering capabilities. +# +# On Linux, the ID represents a connection mark. +# On FreeBSD, the ID represents a socket cookie ID. +# On OpenBSD, the ID represents a route table ID. +# +# The default value is 0, which implies no marking is required. +# socket-mark-id 0 + +################################# TLS/SSL ##################################### + +# By default, TLS/SSL is disabled. To enable it, the "tls-port" configuration +# directive can be used to define TLS-listening ports. To enable TLS on the +# default port, use: +# +# port 0 +# tls-port 6379 + +# Configure a X.509 certificate and private key to use for authenticating the +# server to connected clients, masters or cluster peers. These files should be +# PEM formatted. +# +# tls-cert-file redis.crt +# tls-key-file redis.key +# +# If the key file is encrypted using a passphrase, it can be included here +# as well. +# +# tls-key-file-pass secret + +# Normally Redis uses the same certificate for both server functions (accepting +# connections) and client functions (replicating from a master, establishing +# cluster bus connections, etc.). +# +# Sometimes certificates are issued with attributes that designate them as +# client-only or server-only certificates. In that case it may be desired to use +# different certificates for incoming (server) and outgoing (client) +# connections. To do that, use the following directives: +# +# tls-client-cert-file client.crt +# tls-client-key-file client.key +# +# If the key file is encrypted using a passphrase, it can be included here +# as well. +# +# tls-client-key-file-pass secret + +# Configure a DH parameters file to enable Diffie-Hellman (DH) key exchange, +# required by older versions of OpenSSL (<3.0). Newer versions do not require +# this configuration and recommend against it. +# +# tls-dh-params-file redis.dh + +# Configure a CA certificate(s) bundle or directory to authenticate TLS/SSL +# clients and peers. Redis requires an explicit configuration of at least one +# of these, and will not implicitly use the system wide configuration. +# +# tls-ca-cert-file ca.crt +# tls-ca-cert-dir /etc/ssl/certs + +# By default, clients (including replica servers) on a TLS port are required +# to authenticate using valid client side certificates. +# +# If "no" is specified, client certificates are not required and not accepted. +# If "optional" is specified, client certificates are accepted and must be +# valid if provided, but are not required. +# +# tls-auth-clients no +# tls-auth-clients optional + +# By default, a Redis replica does not attempt to establish a TLS connection +# with its master. +# +# Use the following directive to enable TLS on replication links. +# +# tls-replication yes + +# By default, the Redis Cluster bus uses a plain TCP connection. To enable +# TLS for the bus protocol, use the following directive: +# +# tls-cluster yes + +# By default, only TLSv1.2 and TLSv1.3 are enabled and it is highly recommended +# that older formally deprecated versions are kept disabled to reduce the attack surface. +# You can explicitly specify TLS versions to support. +# Allowed values are case insensitive and include "TLSv1", "TLSv1.1", "TLSv1.2", +# "TLSv1.3" (OpenSSL >= 1.1.1) or any combination. +# To enable only TLSv1.2 and TLSv1.3, use: +# +# tls-protocols "TLSv1.2 TLSv1.3" + +# Configure allowed ciphers. See the ciphers(1ssl) manpage for more information +# about the syntax of this string. +# +# Note: this configuration applies only to <= TLSv1.2. +# +# tls-ciphers DEFAULT:!MEDIUM + +# Configure allowed TLSv1.3 ciphersuites. See the ciphers(1ssl) manpage for more +# information about the syntax of this string, and specifically for TLSv1.3 +# ciphersuites. +# +# tls-ciphersuites TLS_CHACHA20_POLY1305_SHA256 + +# When choosing a cipher, use the server's preference instead of the client +# preference. By default, the server follows the client's preference. +# +# tls-prefer-server-ciphers yes + +# By default, TLS session caching is enabled to allow faster and less expensive +# reconnections by clients that support it. Use the following directive to disable +# caching. +# +# tls-session-caching no + +# Change the default number of TLS sessions cached. A zero value sets the cache +# to unlimited size. The default size is 20480. +# +# tls-session-cache-size 5000 + +# Change the default timeout of cached TLS sessions. The default timeout is 300 +# seconds. +# +# tls-session-cache-timeout 60 + +################################# GENERAL ##################################### + +# By default Redis does not run as a daemon. Use 'yes' if you need it. +# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. +# When Redis is supervised by upstart or systemd, this parameter has no impact. +daemonize no + +# If you run Redis from upstart or systemd, Redis can interact with your +# supervision tree. Options: +# supervised no - no supervision interaction +# supervised upstart - signal upstart by putting Redis into SIGSTOP mode +# requires "expect stop" in your upstart job config +# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET +# on startup, and updating Redis status on a regular +# basis. +# supervised auto - detect upstart or systemd method based on +# UPSTART_JOB or NOTIFY_SOCKET environment variables +# Note: these supervision methods only signal "process is ready." +# They do not enable continuous pings back to your supervisor. +# +# The default is "no". To run under upstart/systemd, you can simply uncomment +# the line below: +# +# supervised auto + +# If a pid file is specified, Redis writes it where specified at startup +# and removes it at exit. +# +# When the server runs non daemonized, no pid file is created if none is +# specified in the configuration. When the server is daemonized, the pid file +# is used even if not specified, defaulting to "/var/run/redis.pid". +# +# Creating a pid file is best effort: if Redis is not able to create it +# nothing bad happens, the server will start and run normally. +# +# Note that on modern Linux systems "/run/redis.pid" is more conforming +# and should be used instead. +pidfile /var/run/redis_6379.pid + +# Specify the server verbosity level. +# This can be one of: +# debug (a lot of information, useful for development/testing) +# verbose (many rarely useful info, but not a mess like the debug level) +# notice (moderately verbose, what you want in production probably) +# warning (only very important / critical messages are logged) +loglevel notice + +# Specify the log file name. Also the empty string can be used to force +# Redis to log on the standard output. Note that if you use standard +# output for logging but daemonize, logs will be sent to /dev/null +logfile "/home/redis_master/redis.log" + +# To enable logging to the system logger, just set 'syslog-enabled' to yes, +# and optionally update the other syslog parameters to suit your needs. +# syslog-enabled no + +# Specify the syslog identity. +# syslog-ident redis + +# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. +# syslog-facility local0 + +# To disable the built in crash log, which will possibly produce cleaner core +# dumps when they are needed, uncomment the following: +# +# crash-log-enabled no + +# To disable the fast memory check that's run as part of the crash log, which +# will possibly let redis terminate sooner, uncomment the following: +# +# crash-memcheck-enabled no + +# Set the number of databases. The default database is DB 0, you can select +# a different one on a per-connection basis using SELECT where +# dbid is a number between 0 and 'databases'-1 +databases 16 + +# By default Redis shows an ASCII art logo only when started to log to the +# standard output and if the standard output is a TTY and syslog logging is +# disabled. Basically this means that normally a logo is displayed only in +# interactive sessions. +# +# However it is possible to force the pre-4.0 behavior and always show a +# ASCII art logo in startup logs by setting the following option to yes. +always-show-logo no + +# By default, Redis modifies the process title (as seen in 'top' and 'ps') to +# provide some runtime information. It is possible to disable this and leave +# the process name as executed by setting the following to no. +set-proc-title yes + +# When changing the process title, Redis uses the following template to construct +# the modified title. +# +# Template variables are specified in curly brackets. The following variables are +# supported: +# +# {title} Name of process as executed if parent, or type of child process. +# {listen-addr} Bind address or '*' followed by TCP or TLS port listening on, or +# Unix socket if only that's available. +# {server-mode} Special mode, i.e. "[sentinel]" or "[cluster]". +# {port} TCP port listening on, or 0. +# {tls-port} TLS port listening on, or 0. +# {unixsocket} Unix domain socket listening on, or "". +# {config-file} Name of configuration file used. +# +proc-title-template "{title} {listen-addr} {server-mode}" + +################################ SNAPSHOTTING ################################ + +# Save the DB to disk. +# +# save [ ...] +# +# Redis will save the DB if the given number of seconds elapsed and it +# surpassed the given number of write operations against the DB. +# +# Snapshotting can be completely disabled with a single empty string argument +# as in following example: +# +# save "" +# +# Unless specified otherwise, by default Redis will save the DB: +# * After 3600 seconds (an hour) if at least 1 change was performed +# * After 300 seconds (5 minutes) if at least 100 changes were performed +# * After 60 seconds if at least 10000 changes were performed +# +# You can set these explicitly by uncommenting the following line. +# +# save 3600 1 300 100 60 10000 + +# By default Redis will stop accepting writes if RDB snapshots are enabled +# (at least one save point) and the latest background save failed. +# This will make the user aware (in a hard way) that data is not persisting +# on disk properly, otherwise chances are that no one will notice and some +# disaster will happen. +# +# If the background saving process will start working again Redis will +# automatically allow writes again. +# +# However if you have setup your proper monitoring of the Redis server +# and persistence, you may want to disable this feature so that Redis will +# continue to work as usual even if there are problems with disk, +# permissions, and so forth. +stop-writes-on-bgsave-error no + +# Compress string objects using LZF when dump .rdb databases? +# By default compression is enabled as it's almost always a win. +# If you want to save some CPU in the saving child set it to 'no' but +# the dataset will likely be bigger if you have compressible values or keys. +rdbcompression yes + +# Since version 5 of RDB a CRC64 checksum is placed at the end of the file. +# This makes the format more resistant to corruption but there is a performance +# hit to pay (around 10%) when saving and loading RDB files, so you can disable it +# for maximum performances. +# +# RDB files created with checksum disabled have a checksum of zero that will +# tell the loading code to skip the check. +rdbchecksum yes + +# Enables or disables full sanitization checks for ziplist and listpack etc when +# loading an RDB or RESTORE payload. This reduces the chances of a assertion or +# crash later on while processing commands. +# Options: +# no - Never perform full sanitization +# yes - Always perform full sanitization +# clients - Perform full sanitization only for user connections. +# Excludes: RDB files, RESTORE commands received from the master +# connection, and client connections which have the +# skip-sanitize-payload ACL flag. +# The default should be 'clients' but since it currently affects cluster +# resharding via MIGRATE, it is temporarily set to 'no' by default. +# +# sanitize-dump-payload no + +# The filename where to dump the DB +dbfilename dump.rdb + +# Remove RDB files used by replication in instances without persistence +# enabled. By default this option is disabled, however there are environments +# where for regulations or other security concerns, RDB files persisted on +# disk by masters in order to feed replicas, or stored on disk by replicas +# in order to load them for the initial synchronization, should be deleted +# ASAP. Note that this option ONLY WORKS in instances that have both AOF +# and RDB persistence disabled, otherwise is completely ignored. +# +# An alternative (and sometimes better) way to obtain the same effect is +# to use diskless replication on both master and replicas instances. However +# in the case of replicas, diskless is not always an option. +rdb-del-sync-files no + +# The working directory. +# +# The DB will be written inside this directory, with the filename specified +# above using the 'dbfilename' configuration directive. +# +# The Append Only File will also be created inside this directory. +# +# Note that you must specify a directory here, not a file name. +dir ./ + +################################# REPLICATION ################################# + +# Master-Replica replication. Use replicaof to make a Redis instance a copy of +# another Redis server. A few things to understand ASAP about Redis replication. +# +# +------------------+ +---------------+ +# | Master | ---> | Replica | +# | (receive writes) | | (exact copy) | +# +------------------+ +---------------+ +# +# 1) Redis replication is asynchronous, but you can configure a master to +# stop accepting writes if it appears to be not connected with at least +# a given number of replicas. +# 2) Redis replicas are able to perform a partial resynchronization with the +# master if the replication link is lost for a relatively small amount of +# time. You may want to configure the replication backlog size (see the next +# sections of this file) with a sensible value depending on your needs. +# 3) Replication is automatic and does not need user intervention. After a +# network partition replicas automatically try to reconnect to masters +# and resynchronize with them. +# +# replicaof + +# If the master is password protected (using the "requirepass" configuration +# directive below) it is possible to tell the replica to authenticate before +# starting the replication synchronization process, otherwise the master will +# refuse the replica request. +# +masterauth KT-i5#i%-%LxKfZ5YJj6 +# +# However this is not enough if you are using Redis ACLs (for Redis version +# 6 or greater), and the default user is not capable of running the PSYNC +# command and/or other commands needed for replication. In this case it's +# better to configure a special user to use with replication, and specify the +# masteruser configuration as such: +# +# masteruser +# +# When masteruser is specified, the replica will authenticate against its +# master using the new AUTH form: AUTH . + +# When a replica loses its connection with the master, or when the replication +# is still in progress, the replica can act in two different ways: +# +# 1) if replica-serve-stale-data is set to 'yes' (the default) the replica will +# still reply to client requests, possibly with out of date data, or the +# data set may just be empty if this is the first synchronization. +# +# 2) If replica-serve-stale-data is set to 'no' the replica will reply with error +# "MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'" +# to all data access commands, excluding commands such as: +# INFO, REPLICAOF, AUTH, SHUTDOWN, REPLCONF, ROLE, CONFIG, SUBSCRIBE, +# UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, PUBLISH, PUBSUB, COMMAND, POST, +# HOST and LATENCY. +# +replica-serve-stale-data yes + +# You can configure a replica instance to accept writes or not. Writing against +# a replica instance may be useful to store some ephemeral data (because data +# written on a replica will be easily deleted after resync with the master) but +# may also cause problems if clients are writing to it because of a +# misconfiguration. +# +# Since Redis 2.6 by default replicas are read-only. +# +# Note: read only replicas are not designed to be exposed to untrusted clients +# on the internet. It's just a protection layer against misuse of the instance. +# Still a read only replica exports by default all the administrative commands +# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve +# security of read only replicas using 'rename-command' to shadow all the +# administrative / dangerous commands. +replica-read-only yes + +# Replication SYNC strategy: disk or socket. +# +# New replicas and reconnecting replicas that are not able to continue the +# replication process just receiving differences, need to do what is called a +# "full synchronization". An RDB file is transmitted from the master to the +# replicas. +# +# The transmission can happen in two different ways: +# +# 1) Disk-backed: The Redis master creates a new process that writes the RDB +# file on disk. Later the file is transferred by the parent +# process to the replicas incrementally. +# 2) Diskless: The Redis master creates a new process that directly writes the +# RDB file to replica sockets, without touching the disk at all. +# +# With disk-backed replication, while the RDB file is generated, more replicas +# can be queued and served with the RDB file as soon as the current child +# producing the RDB file finishes its work. With diskless replication instead +# once the transfer starts, new replicas arriving will be queued and a new +# transfer will start when the current one terminates. +# +# When diskless replication is used, the master waits a configurable amount of +# time (in seconds) before starting the transfer in the hope that multiple +# replicas will arrive and the transfer can be parallelized. +# +# With slow disks and fast (large bandwidth) networks, diskless replication +# works better. +repl-diskless-sync yes + +# When diskless replication is enabled, it is possible to configure the delay +# the server waits in order to spawn the child that transfers the RDB via socket +# to the replicas. +# +# This is important since once the transfer starts, it is not possible to serve +# new replicas arriving, that will be queued for the next RDB transfer, so the +# server waits a delay in order to let more replicas arrive. +# +# The delay is specified in seconds, and by default is 5 seconds. To disable +# it entirely just set it to 0 seconds and the transfer will start ASAP. +repl-diskless-sync-delay 5 + +# When diskless replication is enabled with a delay, it is possible to let +# the replication start before the maximum delay is reached if the maximum +# number of replicas expected have connected. Default of 0 means that the +# maximum is not defined and Redis will wait the full delay. +repl-diskless-sync-max-replicas 0 + +# ----------------------------------------------------------------------------- +# WARNING: RDB diskless load is experimental. Since in this setup the replica +# does not immediately store an RDB on disk, it may cause data loss during +# failovers. RDB diskless load + Redis modules not handling I/O reads may also +# cause Redis to abort in case of I/O errors during the initial synchronization +# stage with the master. Use only if you know what you are doing. +# ----------------------------------------------------------------------------- +# +# Replica can load the RDB it reads from the replication link directly from the +# socket, or store the RDB to a file and read that file after it was completely +# received from the master. +# +# In many cases the disk is slower than the network, and storing and loading +# the RDB file may increase replication time (and even increase the master's +# Copy on Write memory and replica buffers). +# However, parsing the RDB file directly from the socket may mean that we have +# to flush the contents of the current database before the full rdb was +# received. For this reason we have the following options: +# +# "disabled" - Don't use diskless load (store the rdb file to the disk first) +# "on-empty-db" - Use diskless load only when it is completely safe. +# "swapdb" - Keep current db contents in RAM while parsing the data directly +# from the socket. Replicas in this mode can keep serving current +# data set while replication is in progress, except for cases where +# they can't recognize master as having a data set from same +# replication history. +# Note that this requires sufficient memory, if you don't have it, +# you risk an OOM kill. +repl-diskless-load disabled + +# Master send PINGs to its replicas in a predefined interval. It's possible to +# change this interval with the repl_ping_replica_period option. The default +# value is 10 seconds. +# +# repl-ping-replica-period 10 + +# The following option sets the replication timeout for: +# +# 1) Bulk transfer I/O during SYNC, from the point of view of replica. +# 2) Master timeout from the point of view of replicas (data, pings). +# 3) Replica timeout from the point of view of masters (REPLCONF ACK pings). +# +# It is important to make sure that this value is greater than the value +# specified for repl-ping-replica-period otherwise a timeout will be detected +# every time there is low traffic between the master and the replica. The default +# value is 60 seconds. +# +# repl-timeout 60 + +# Disable TCP_NODELAY on the replica socket after SYNC? +# +# If you select "yes" Redis will use a smaller number of TCP packets and +# less bandwidth to send data to replicas. But this can add a delay for +# the data to appear on the replica side, up to 40 milliseconds with +# Linux kernels using a default configuration. +# +# If you select "no" the delay for data to appear on the replica side will +# be reduced but more bandwidth will be used for replication. +# +# By default we optimize for low latency, but in very high traffic conditions +# or when the master and replicas are many hops away, turning this to "yes" may +# be a good idea. +repl-disable-tcp-nodelay no + +# Set the replication backlog size. The backlog is a buffer that accumulates +# replica data when replicas are disconnected for some time, so that when a +# replica wants to reconnect again, often a full resync is not needed, but a +# partial resync is enough, just passing the portion of data the replica +# missed while disconnected. +# +# The bigger the replication backlog, the longer the replica can endure the +# disconnect and later be able to perform a partial resynchronization. +# +# The backlog is only allocated if there is at least one replica connected. +# +# repl-backlog-size 1mb + +# After a master has no connected replicas for some time, the backlog will be +# freed. The following option configures the amount of seconds that need to +# elapse, starting from the time the last replica disconnected, for the backlog +# buffer to be freed. +# +# Note that replicas never free the backlog for timeout, since they may be +# promoted to masters later, and should be able to correctly "partially +# resynchronize" with other replicas: hence they should always accumulate backlog. +# +# A value of 0 means to never release the backlog. +# +# repl-backlog-ttl 3600 + +# The replica priority is an integer number published by Redis in the INFO +# output. It is used by Redis Sentinel in order to select a replica to promote +# into a master if the master is no longer working correctly. +# +# A replica with a low priority number is considered better for promotion, so +# for instance if there are three replicas with priority 10, 100, 25 Sentinel +# will pick the one with priority 10, that is the lowest. +# +# However a special priority of 0 marks the replica as not able to perform the +# role of master, so a replica with priority of 0 will never be selected by +# Redis Sentinel for promotion. +# +# By default the priority is 100. +replica-priority 100 + +# The propagation error behavior controls how Redis will behave when it is +# unable to handle a command being processed in the replication stream from a master +# or processed while reading from an AOF file. Errors that occur during propagation +# are unexpected, and can cause data inconsistency. However, there are edge cases +# in earlier versions of Redis where it was possible for the server to replicate or persist +# commands that would fail on future versions. For this reason the default behavior +# is to ignore such errors and continue processing commands. +# +# If an application wants to ensure there is no data divergence, this configuration +# should be set to 'panic' instead. The value can also be set to 'panic-on-replicas' +# to only panic when a replica encounters an error on the replication stream. One of +# these two panic values will become the default value in the future once there are +# sufficient safety mechanisms in place to prevent false positive crashes. +# +# propagation-error-behavior ignore + +# Replica ignore disk write errors controls the behavior of a replica when it is +# unable to persist a write command received from its master to disk. By default, +# this configuration is set to 'no' and will crash the replica in this condition. +# It is not recommended to change this default, however in order to be compatible +# with older versions of Redis this config can be toggled to 'yes' which will just +# log a warning and execute the write command it got from the master. +# +# replica-ignore-disk-write-errors no + +# ----------------------------------------------------------------------------- +# By default, Redis Sentinel includes all replicas in its reports. A replica +# can be excluded from Redis Sentinel's announcements. An unannounced replica +# will be ignored by the 'sentinel replicas ' command and won't be +# exposed to Redis Sentinel's clients. +# +# This option does not change the behavior of replica-priority. Even with +# replica-announced set to 'no', the replica can be promoted to master. To +# prevent this behavior, set replica-priority to 0. +# +# replica-announced yes + +# It is possible for a master to stop accepting writes if there are less than +# N replicas connected, having a lag less or equal than M seconds. +# +# The N replicas need to be in "online" state. +# +# The lag in seconds, that must be <= the specified value, is calculated from +# the last ping received from the replica, that is usually sent every second. +# +# This option does not GUARANTEE that N replicas will accept the write, but +# will limit the window of exposure for lost writes in case not enough replicas +# are available, to the specified number of seconds. +# +# For example to require at least 3 replicas with a lag <= 10 seconds use: +# +# min-replicas-to-write 3 +# min-replicas-max-lag 10 +# +# Setting one or the other to 0 disables the feature. +# +# By default min-replicas-to-write is set to 0 (feature disabled) and +# min-replicas-max-lag is set to 10. + +# A Redis master is able to list the address and port of the attached +# replicas in different ways. For example the "INFO replication" section +# offers this information, which is used, among other tools, by +# Redis Sentinel in order to discover replica instances. +# Another place where this info is available is in the output of the +# "ROLE" command of a master. +# +# The listed IP address and port normally reported by a replica is +# obtained in the following way: +# +# IP: The address is auto detected by checking the peer address +# of the socket used by the replica to connect with the master. +# +# Port: The port is communicated by the replica during the replication +# handshake, and is normally the port that the replica is using to +# listen for connections. +# +# However when port forwarding or Network Address Translation (NAT) is +# used, the replica may actually be reachable via different IP and port +# pairs. The following two options can be used by a replica in order to +# report to its master a specific set of IP and port, so that both INFO +# and ROLE will report those values. +# +# There is no need to use both the options if you need to override just +# the port or the IP address. +# +# replica-announce-ip 5.5.5.5 +# replica-announce-port 1234 + +############################### KEYS TRACKING ################################# + +# Redis implements server assisted support for client side caching of values. +# This is implemented using an invalidation table that remembers, using +# a radix key indexed by key name, what clients have which keys. In turn +# this is used in order to send invalidation messages to clients. Please +# check this page to understand more about the feature: +# +# https://redis.io/topics/client-side-caching +# +# When tracking is enabled for a client, all the read only queries are assumed +# to be cached: this will force Redis to store information in the invalidation +# table. When keys are modified, such information is flushed away, and +# invalidation messages are sent to the clients. However if the workload is +# heavily dominated by reads, Redis could use more and more memory in order +# to track the keys fetched by many clients. +# +# For this reason it is possible to configure a maximum fill value for the +# invalidation table. By default it is set to 1M of keys, and once this limit +# is reached, Redis will start to evict keys in the invalidation table +# even if they were not modified, just to reclaim memory: this will in turn +# force the clients to invalidate the cached values. Basically the table +# maximum size is a trade off between the memory you want to spend server +# side to track information about who cached what, and the ability of clients +# to retain cached objects in memory. +# +# If you set the value to 0, it means there are no limits, and Redis will +# retain as many keys as needed in the invalidation table. +# In the "stats" INFO section, you can find information about the number of +# keys in the invalidation table at every given moment. +# +# Note: when key tracking is used in broadcasting mode, no memory is used +# in the server side so this setting is useless. +# +# tracking-table-max-keys 1000000 + +################################## SECURITY ################################### + +# Warning: since Redis is pretty fast, an outside user can try up to +# 1 million passwords per second against a modern box. This means that you +# should use very strong passwords, otherwise they will be very easy to break. +# Note that because the password is really a shared secret between the client +# and the server, and should not be memorized by any human, the password +# can be easily a long string from /dev/urandom or whatever, so by using a +# long and unguessable password no brute force attack will be possible. + +# Redis ACL users are defined in the following format: +# +# user ... acl rules ... +# +# For example: +# +# user worker +@list +@connection ~jobs:* on >ffa9203c493aa99 +# +# The special username "default" is used for new connections. If this user +# has the "nopass" rule, then new connections will be immediately authenticated +# as the "default" user without the need of any password provided via the +# AUTH command. Otherwise if the "default" user is not flagged with "nopass" +# the connections will start in not authenticated state, and will require +# AUTH (or the HELLO command AUTH option) in order to be authenticated and +# start to work. +# +# The ACL rules that describe what a user can do are the following: +# +# on Enable the user: it is possible to authenticate as this user. +# off Disable the user: it's no longer possible to authenticate +# with this user, however the already authenticated connections +# will still work. +# skip-sanitize-payload RESTORE dump-payload sanitization is skipped. +# sanitize-payload RESTORE dump-payload is sanitized (default). +# + Allow the execution of that command. +# May be used with `|` for allowing subcommands (e.g "+config|get") +# - Disallow the execution of that command. +# May be used with `|` for blocking subcommands (e.g "-config|set") +# +@ Allow the execution of all the commands in such category +# with valid categories are like @admin, @set, @sortedset, ... +# and so forth, see the full list in the server.c file where +# the Redis command table is described and defined. +# The special category @all means all the commands, but currently +# present in the server, and that will be loaded in the future +# via modules. +# +|first-arg Allow a specific first argument of an otherwise +# disabled command. It is only supported on commands with +# no sub-commands, and is not allowed as negative form +# like -SELECT|1, only additive starting with "+". This +# feature is deprecated and may be removed in the future. +# allcommands Alias for +@all. Note that it implies the ability to execute +# all the future commands loaded via the modules system. +# nocommands Alias for -@all. +# ~ Add a pattern of keys that can be mentioned as part of +# commands. For instance ~* allows all the keys. The pattern +# is a glob-style pattern like the one of KEYS. +# It is possible to specify multiple patterns. +# %R~ Add key read pattern that specifies which keys can be read +# from. +# %W~ Add key write pattern that specifies which keys can be +# written to. +# allkeys Alias for ~* +# resetkeys Flush the list of allowed keys patterns. +# & Add a glob-style pattern of Pub/Sub channels that can be +# accessed by the user. It is possible to specify multiple channel +# patterns. +# allchannels Alias for &* +# resetchannels Flush the list of allowed channel patterns. +# > Add this password to the list of valid password for the user. +# For example >mypass will add "mypass" to the list. +# This directive clears the "nopass" flag (see later). +# < Remove this password from the list of valid passwords. +# nopass All the set passwords of the user are removed, and the user +# is flagged as requiring no password: it means that every +# password will work against this user. If this directive is +# used for the default user, every new connection will be +# immediately authenticated with the default user without +# any explicit AUTH command required. Note that the "resetpass" +# directive will clear this condition. +# resetpass Flush the list of allowed passwords. Moreover removes the +# "nopass" status. After "resetpass" the user has no associated +# passwords and there is no way to authenticate without adding +# some password (or setting it as "nopass" later). +# reset Performs the following actions: resetpass, resetkeys, off, +# -@all. The user returns to the same state it has immediately +# after its creation. +# () Create a new selector with the options specified within the +# parentheses and attach it to the user. Each option should be +# space separated. The first character must be ( and the last +# character must be ). +# clearselectors Remove all of the currently attached selectors. +# Note this does not change the "root" user permissions, +# which are the permissions directly applied onto the +# user (outside the parentheses). +# +# ACL rules can be specified in any order: for instance you can start with +# passwords, then flags, or key patterns. However note that the additive +# and subtractive rules will CHANGE MEANING depending on the ordering. +# For instance see the following example: +# +# user alice on +@all -DEBUG ~* >somepassword +# +# This will allow "alice" to use all the commands with the exception of the +# DEBUG command, since +@all added all the commands to the set of the commands +# alice can use, and later DEBUG was removed. However if we invert the order +# of two ACL rules the result will be different: +# +# user alice on -DEBUG +@all ~* >somepassword +# +# Now DEBUG was removed when alice had yet no commands in the set of allowed +# commands, later all the commands are added, so the user will be able to +# execute everything. +# +# Basically ACL rules are processed left-to-right. +# +# The following is a list of command categories and their meanings: +# * keyspace - Writing or reading from keys, databases, or their metadata +# in a type agnostic way. Includes DEL, RESTORE, DUMP, RENAME, EXISTS, DBSIZE, +# KEYS, EXPIRE, TTL, FLUSHALL, etc. Commands that may modify the keyspace, +# key or metadata will also have `write` category. Commands that only read +# the keyspace, key or metadata will have the `read` category. +# * read - Reading from keys (values or metadata). Note that commands that don't +# interact with keys, will not have either `read` or `write`. +# * write - Writing to keys (values or metadata) +# * admin - Administrative commands. Normal applications will never need to use +# these. Includes REPLICAOF, CONFIG, DEBUG, SAVE, MONITOR, ACL, SHUTDOWN, etc. +# * dangerous - Potentially dangerous (each should be considered with care for +# various reasons). This includes FLUSHALL, MIGRATE, RESTORE, SORT, KEYS, +# CLIENT, DEBUG, INFO, CONFIG, SAVE, REPLICAOF, etc. +# * connection - Commands affecting the connection or other connections. +# This includes AUTH, SELECT, COMMAND, CLIENT, ECHO, PING, etc. +# * blocking - Potentially blocking the connection until released by another +# command. +# * fast - Fast O(1) commands. May loop on the number of arguments, but not the +# number of elements in the key. +# * slow - All commands that are not Fast. +# * pubsub - PUBLISH / SUBSCRIBE related +# * transaction - WATCH / MULTI / EXEC related commands. +# * scripting - Scripting related. +# * set - Data type: sets related. +# * sortedset - Data type: zsets related. +# * list - Data type: lists related. +# * hash - Data type: hashes related. +# * string - Data type: strings related. +# * bitmap - Data type: bitmaps related. +# * hyperloglog - Data type: hyperloglog related. +# * geo - Data type: geo related. +# * stream - Data type: streams related. +# +# For more information about ACL configuration please refer to +# the Redis web site at https://redis.io/topics/acl + +# ACL LOG +# +# The ACL Log tracks failed commands and authentication events associated +# with ACLs. The ACL Log is useful to troubleshoot failed commands blocked +# by ACLs. The ACL Log is stored in memory. You can reclaim memory with +# ACL LOG RESET. Define the maximum entry length of the ACL Log below. +acllog-max-len 128 + +# Using an external ACL file +# +# Instead of configuring users here in this file, it is possible to use +# a stand-alone file just listing users. The two methods cannot be mixed: +# if you configure users here and at the same time you activate the external +# ACL file, the server will refuse to start. +# +# The format of the external ACL user file is exactly the same as the +# format that is used inside redis.conf to describe users. +# +# aclfile /etc/redis/users.acl + +# IMPORTANT NOTE: starting with Redis 6 "requirepass" is just a compatibility +# layer on top of the new ACL system. The option effect will be just setting +# the password for the default user. Clients will still authenticate using +# AUTH as usually, or more explicitly with AUTH default +# if they follow the new protocol: both will work. +# +# The requirepass is not compatible with aclfile option and the ACL LOAD +# command, these will cause requirepass to be ignored. +# +requirepass KT-i5#i%-%LxKfZ5YJj6 + +# New users are initialized with restrictive permissions by default, via the +# equivalent of this ACL rule 'off resetkeys -@all'. Starting with Redis 6.2, it +# is possible to manage access to Pub/Sub channels with ACL rules as well. The +# default Pub/Sub channels permission if new users is controlled by the +# acl-pubsub-default configuration directive, which accepts one of these values: +# +# allchannels: grants access to all Pub/Sub channels +# resetchannels: revokes access to all Pub/Sub channels +# +# From Redis 7.0, acl-pubsub-default defaults to 'resetchannels' permission. +# +# acl-pubsub-default resetchannels + +# Command renaming (DEPRECATED). +# +# ------------------------------------------------------------------------ +# WARNING: avoid using this option if possible. Instead use ACLs to remove +# commands from the default user, and put them only in some admin user you +# create for administrative purposes. +# ------------------------------------------------------------------------ +# +# It is possible to change the name of dangerous commands in a shared +# environment. For instance the CONFIG command may be renamed into something +# hard to guess so that it will still be available for internal-use tools +# but not available for general clients. +# +# Example: +# +# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 +# +# It is also possible to completely kill a command by renaming it into +# an empty string: +# +# rename-command CONFIG "" +# +# Please note that changing the name of commands that are logged into the +# AOF file or transmitted to replicas may cause problems. + +################################### CLIENTS #################################### + +# Set the max number of connected clients at the same time. By default +# this limit is set to 10000 clients, however if the Redis server is not +# able to configure the process file limit to allow for the specified limit +# the max number of allowed clients is set to the current file limit +# minus 32 (as Redis reserves a few file descriptors for internal uses). +# +# Once the limit is reached Redis will close all the new connections sending +# an error 'max number of clients reached'. +# +# IMPORTANT: When Redis Cluster is used, the max number of connections is also +# shared with the cluster bus: every node in the cluster will use two +# connections, one incoming and another outgoing. It is important to size the +# limit accordingly in case of very large clusters. +# +# maxclients 10000 + +############################## MEMORY MANAGEMENT ################################ + +# Set a memory usage limit to the specified amount of bytes. +# When the memory limit is reached Redis will try to remove keys +# according to the eviction policy selected (see maxmemory-policy). +# +# If Redis can't remove keys according to the policy, or if the policy is +# set to 'noeviction', Redis will start to reply with errors to commands +# that would use more memory, like SET, LPUSH, and so on, and will continue +# to reply to read-only commands like GET. +# +# This option is usually useful when using Redis as an LRU or LFU cache, or to +# set a hard memory limit for an instance (using the 'noeviction' policy). +# +# WARNING: If you have replicas attached to an instance with maxmemory on, +# the size of the output buffers needed to feed the replicas are subtracted +# from the used memory count, so that network problems / resyncs will +# not trigger a loop where keys are evicted, and in turn the output +# buffer of replicas is full with DELs of keys evicted triggering the deletion +# of more keys, and so forth until the database is completely emptied. +# +# In short... if you have replicas attached it is suggested that you set a lower +# limit for maxmemory so that there is some free RAM on the system for replica +# output buffers (but this is not needed if the policy is 'noeviction'). +# +# maxmemory + +# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory +# is reached. You can select one from the following behaviors: +# +# volatile-lru -> Evict using approximated LRU, only keys with an expire set. +# allkeys-lru -> Evict any key using approximated LRU. +# volatile-lfu -> Evict using approximated LFU, only keys with an expire set. +# allkeys-lfu -> Evict any key using approximated LFU. +# volatile-random -> Remove a random key having an expire set. +# allkeys-random -> Remove a random key, any key. +# volatile-ttl -> Remove the key with the nearest expire time (minor TTL) +# noeviction -> Don't evict anything, just return an error on write operations. +# +# LRU means Least Recently Used +# LFU means Least Frequently Used +# +# Both LRU, LFU and volatile-ttl are implemented using approximated +# randomized algorithms. +# +# Note: with any of the above policies, when there are no suitable keys for +# eviction, Redis will return an error on write operations that require +# more memory. These are usually commands that create new keys, add data or +# modify existing keys. A few examples are: SET, INCR, HSET, LPUSH, SUNIONSTORE, +# SORT (due to the STORE argument), and EXEC (if the transaction includes any +# command that requires memory). +# +# The default is: +# +# maxmemory-policy noeviction + +# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated +# algorithms (in order to save memory), so you can tune it for speed or +# accuracy. By default Redis will check five keys and pick the one that was +# used least recently, you can change the sample size using the following +# configuration directive. +# +# The default of 5 produces good enough results. 10 Approximates very closely +# true LRU but costs more CPU. 3 is faster but not very accurate. +# +# maxmemory-samples 5 + +# Eviction processing is designed to function well with the default setting. +# If there is an unusually large amount of write traffic, this value may need to +# be increased. Decreasing this value may reduce latency at the risk of +# eviction processing effectiveness +# 0 = minimum latency, 10 = default, 100 = process without regard to latency +# +# maxmemory-eviction-tenacity 10 + +# Starting from Redis 5, by default a replica will ignore its maxmemory setting +# (unless it is promoted to master after a failover or manually). It means +# that the eviction of keys will be just handled by the master, sending the +# DEL commands to the replica as keys evict in the master side. +# +# This behavior ensures that masters and replicas stay consistent, and is usually +# what you want, however if your replica is writable, or you want the replica +# to have a different memory setting, and you are sure all the writes performed +# to the replica are idempotent, then you may change this default (but be sure +# to understand what you are doing). +# +# Note that since the replica by default does not evict, it may end using more +# memory than the one set via maxmemory (there are certain buffers that may +# be larger on the replica, or data structures may sometimes take more memory +# and so forth). So make sure you monitor your replicas and make sure they +# have enough memory to never hit a real out-of-memory condition before the +# master hits the configured maxmemory setting. +# +# replica-ignore-maxmemory yes + +# Redis reclaims expired keys in two ways: upon access when those keys are +# found to be expired, and also in background, in what is called the +# "active expire key". The key space is slowly and interactively scanned +# looking for expired keys to reclaim, so that it is possible to free memory +# of keys that are expired and will never be accessed again in a short time. +# +# The default effort of the expire cycle will try to avoid having more than +# ten percent of expired keys still in memory, and will try to avoid consuming +# more than 25% of total memory and to add latency to the system. However +# it is possible to increase the expire "effort" that is normally set to +# "1", to a greater value, up to the value "10". At its maximum value the +# system will use more CPU, longer cycles (and technically may introduce +# more latency), and will tolerate less already expired keys still present +# in the system. It's a tradeoff between memory, CPU and latency. +# +# active-expire-effort 1 + +############################# LAZY FREEING #################################### + +# Redis has two primitives to delete keys. One is called DEL and is a blocking +# deletion of the object. It means that the server stops processing new commands +# in order to reclaim all the memory associated with an object in a synchronous +# way. If the key deleted is associated with a small object, the time needed +# in order to execute the DEL command is very small and comparable to most other +# O(1) or O(log_N) commands in Redis. However if the key is associated with an +# aggregated value containing millions of elements, the server can block for +# a long time (even seconds) in order to complete the operation. +# +# For the above reasons Redis also offers non blocking deletion primitives +# such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and +# FLUSHDB commands, in order to reclaim memory in background. Those commands +# are executed in constant time. Another thread will incrementally free the +# object in the background as fast as possible. +# +# DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled. +# It's up to the design of the application to understand when it is a good +# idea to use one or the other. However the Redis server sometimes has to +# delete keys or flush the whole database as a side effect of other operations. +# Specifically Redis deletes objects independently of a user call in the +# following scenarios: +# +# 1) On eviction, because of the maxmemory and maxmemory policy configurations, +# in order to make room for new data, without going over the specified +# memory limit. +# 2) Because of expire: when a key with an associated time to live (see the +# EXPIRE command) must be deleted from memory. +# 3) Because of a side effect of a command that stores data on a key that may +# already exist. For example the RENAME command may delete the old key +# content when it is replaced with another one. Similarly SUNIONSTORE +# or SORT with STORE option may delete existing keys. The SET command +# itself removes any old content of the specified key in order to replace +# it with the specified string. +# 4) During replication, when a replica performs a full resynchronization with +# its master, the content of the whole database is removed in order to +# load the RDB file just transferred. +# +# In all the above cases the default is to delete objects in a blocking way, +# like if DEL was called. However you can configure each case specifically +# in order to instead release memory in a non-blocking way like if UNLINK +# was called, using the following configuration directives. + +lazyfree-lazy-eviction no +lazyfree-lazy-expire no +lazyfree-lazy-server-del no +replica-lazy-flush no + +# It is also possible, for the case when to replace the user code DEL calls +# with UNLINK calls is not easy, to modify the default behavior of the DEL +# command to act exactly like UNLINK, using the following configuration +# directive: + +lazyfree-lazy-user-del no + +# FLUSHDB, FLUSHALL, SCRIPT FLUSH and FUNCTION FLUSH support both asynchronous and synchronous +# deletion, which can be controlled by passing the [SYNC|ASYNC] flags into the +# commands. When neither flag is passed, this directive will be used to determine +# if the data should be deleted asynchronously. + +lazyfree-lazy-user-flush no + +################################ THREADED I/O ################################# + +# Redis is mostly single threaded, however there are certain threaded +# operations such as UNLINK, slow I/O accesses and other things that are +# performed on side threads. +# +# Now it is also possible to handle Redis clients socket reads and writes +# in different I/O threads. Since especially writing is so slow, normally +# Redis users use pipelining in order to speed up the Redis performances per +# core, and spawn multiple instances in order to scale more. Using I/O +# threads it is possible to easily speedup two times Redis without resorting +# to pipelining nor sharding of the instance. +# +# By default threading is disabled, we suggest enabling it only in machines +# that have at least 4 or more cores, leaving at least one spare core. +# Using more than 8 threads is unlikely to help much. We also recommend using +# threaded I/O only if you actually have performance problems, with Redis +# instances being able to use a quite big percentage of CPU time, otherwise +# there is no point in using this feature. +# +# So for instance if you have a four cores boxes, try to use 2 or 3 I/O +# threads, if you have a 8 cores, try to use 6 threads. In order to +# enable I/O threads use the following configuration directive: +# +# io-threads 4 +# +# Setting io-threads to 1 will just use the main thread as usual. +# When I/O threads are enabled, we only use threads for writes, that is +# to thread the write(2) syscall and transfer the client buffers to the +# socket. However it is also possible to enable threading of reads and +# protocol parsing using the following configuration directive, by setting +# it to yes: +# +# io-threads-do-reads no +# +# Usually threading reads doesn't help much. +# +# NOTE 1: This configuration directive cannot be changed at runtime via +# CONFIG SET. Also, this feature currently does not work when SSL is +# enabled. +# +# NOTE 2: If you want to test the Redis speedup using redis-benchmark, make +# sure you also run the benchmark itself in threaded mode, using the +# --threads option to match the number of Redis threads, otherwise you'll not +# be able to notice the improvements. + +############################ KERNEL OOM CONTROL ############################## + +# On Linux, it is possible to hint the kernel OOM killer on what processes +# should be killed first when out of memory. +# +# Enabling this feature makes Redis actively control the oom_score_adj value +# for all its processes, depending on their role. The default scores will +# attempt to have background child processes killed before all others, and +# replicas killed before masters. +# +# Redis supports these options: +# +# no: Don't make changes to oom-score-adj (default). +# yes: Alias to "relative" see below. +# absolute: Values in oom-score-adj-values are written as is to the kernel. +# relative: Values are used relative to the initial value of oom_score_adj when +# the server starts and are then clamped to a range of -1000 to 1000. +# Because typically the initial value is 0, they will often match the +# absolute values. +oom-score-adj no + +# When oom-score-adj is used, this directive controls the specific values used +# for master, replica and background child processes. Values range -2000 to +# 2000 (higher means more likely to be killed). +# +# Unprivileged processes (not root, and without CAP_SYS_RESOURCE capabilities) +# can freely increase their value, but not decrease it below its initial +# settings. This means that setting oom-score-adj to "relative" and setting the +# oom-score-adj-values to positive values will always succeed. +oom-score-adj-values 0 200 800 + + +#################### KERNEL transparent hugepage CONTROL ###################### + +# Usually the kernel Transparent Huge Pages control is set to "madvise" or +# or "never" by default (/sys/kernel/mm/transparent_hugepage/enabled), in which +# case this config has no effect. On systems in which it is set to "always", +# redis will attempt to disable it specifically for the redis process in order +# to avoid latency problems specifically with fork(2) and CoW. +# If for some reason you prefer to keep it enabled, you can set this config to +# "no" and the kernel global to "always". + +disable-thp yes + +############################## APPEND ONLY MODE ############################### + +# By default Redis asynchronously dumps the dataset on disk. This mode is +# good enough in many applications, but an issue with the Redis process or +# a power outage may result into a few minutes of writes lost (depending on +# the configured save points). +# +# The Append Only File is an alternative persistence mode that provides +# much better durability. For instance using the default data fsync policy +# (see later in the config file) Redis can lose just one second of writes in a +# dramatic event like a server power outage, or a single write if something +# wrong with the Redis process itself happens, but the operating system is +# still running correctly. +# +# AOF and RDB persistence can be enabled at the same time without problems. +# If the AOF is enabled on startup Redis will load the AOF, that is the file +# with the better durability guarantees. +# +# Please check https://redis.io/topics/persistence for more information. + +appendonly no + +# The base name of the append only file. +# +# Redis 7 and newer use a set of append-only files to persist the dataset +# and changes applied to it. There are two basic types of files in use: +# +# - Base files, which are a snapshot representing the complete state of the +# dataset at the time the file was created. Base files can be either in +# the form of RDB (binary serialized) or AOF (textual commands). +# - Incremental files, which contain additional commands that were applied +# to the dataset following the previous file. +# +# In addition, manifest files are used to track the files and the order in +# which they were created and should be applied. +# +# Append-only file names are created by Redis following a specific pattern. +# The file name's prefix is based on the 'appendfilename' configuration +# parameter, followed by additional information about the sequence and type. +# +# For example, if appendfilename is set to appendonly.aof, the following file +# names could be derived: +# +# - appendonly.aof.1.base.rdb as a base file. +# - appendonly.aof.1.incr.aof, appendonly.aof.2.incr.aof as incremental files. +# - appendonly.aof.manifest as a manifest file. + +appendfilename "appendonly.aof" + +# For convenience, Redis stores all persistent append-only files in a dedicated +# directory. The name of the directory is determined by the appenddirname +# configuration parameter. + +appenddirname "appendonlydir" + +# The fsync() call tells the Operating System to actually write data on disk +# instead of waiting for more data in the output buffer. Some OS will really flush +# data on disk, some other OS will just try to do it ASAP. +# +# Redis supports three different modes: +# +# no: don't fsync, just let the OS flush the data when it wants. Faster. +# always: fsync after every write to the append only log. Slow, Safest. +# everysec: fsync only one time every second. Compromise. +# +# The default is "everysec", as that's usually the right compromise between +# speed and data safety. It's up to you to understand if you can relax this to +# "no" that will let the operating system flush the output buffer when +# it wants, for better performances (but if you can live with the idea of +# some data loss consider the default persistence mode that's snapshotting), +# or on the contrary, use "always" that's very slow but a bit safer than +# everysec. +# +# More details please check the following article: +# http://antirez.com/post/redis-persistence-demystified.html +# +# If unsure, use "everysec". + +# appendfsync always +appendfsync everysec +# appendfsync no + +# When the AOF fsync policy is set to always or everysec, and a background +# saving process (a background save or AOF log background rewriting) is +# performing a lot of I/O against the disk, in some Linux configurations +# Redis may block too long on the fsync() call. Note that there is no fix for +# this currently, as even performing fsync in a different thread will block +# our synchronous write(2) call. +# +# In order to mitigate this problem it's possible to use the following option +# that will prevent fsync() from being called in the main process while a +# BGSAVE or BGREWRITEAOF is in progress. +# +# This means that while another child is saving, the durability of Redis is +# the same as "appendfsync no". In practical terms, this means that it is +# possible to lose up to 30 seconds of log in the worst scenario (with the +# default Linux settings). +# +# If you have latency problems turn this to "yes". Otherwise leave it as +# "no" that is the safest pick from the point of view of durability. + +no-appendfsync-on-rewrite no + +# Automatic rewrite of the append only file. +# Redis is able to automatically rewrite the log file implicitly calling +# BGREWRITEAOF when the AOF log size grows by the specified percentage. +# +# This is how it works: Redis remembers the size of the AOF file after the +# latest rewrite (if no rewrite has happened since the restart, the size of +# the AOF at startup is used). +# +# This base size is compared to the current size. If the current size is +# bigger than the specified percentage, the rewrite is triggered. Also +# you need to specify a minimal size for the AOF file to be rewritten, this +# is useful to avoid rewriting the AOF file even if the percentage increase +# is reached but it is still pretty small. +# +# Specify a percentage of zero in order to disable the automatic AOF +# rewrite feature. + +auto-aof-rewrite-percentage 100 +auto-aof-rewrite-min-size 64mb + +# An AOF file may be found to be truncated at the end during the Redis +# startup process, when the AOF data gets loaded back into memory. +# This may happen when the system where Redis is running +# crashes, especially when an ext4 filesystem is mounted without the +# data=ordered option (however this can't happen when Redis itself +# crashes or aborts but the operating system still works correctly). +# +# Redis can either exit with an error when this happens, or load as much +# data as possible (the default now) and start if the AOF file is found +# to be truncated at the end. The following option controls this behavior. +# +# If aof-load-truncated is set to yes, a truncated AOF file is loaded and +# the Redis server starts emitting a log to inform the user of the event. +# Otherwise if the option is set to no, the server aborts with an error +# and refuses to start. When the option is set to no, the user requires +# to fix the AOF file using the "redis-check-aof" utility before to restart +# the server. +# +# Note that if the AOF file will be found to be corrupted in the middle +# the server will still exit with an error. This option only applies when +# Redis will try to read more data from the AOF file but not enough bytes +# will be found. +aof-load-truncated yes + +# Redis can create append-only base files in either RDB or AOF formats. Using +# the RDB format is always faster and more efficient, and disabling it is only +# supported for backward compatibility purposes. +aof-use-rdb-preamble yes + +# Redis supports recording timestamp annotations in the AOF to support restoring +# the data from a specific point-in-time. However, using this capability changes +# the AOF format in a way that may not be compatible with existing AOF parsers. +aof-timestamp-enabled no + +################################ SHUTDOWN ##################################### + +# Maximum time to wait for replicas when shutting down, in seconds. +# +# During shut down, a grace period allows any lagging replicas to catch up with +# the latest replication offset before the master exists. This period can +# prevent data loss, especially for deployments without configured disk backups. +# +# The 'shutdown-timeout' value is the grace period's duration in seconds. It is +# only applicable when the instance has replicas. To disable the feature, set +# the value to 0. +# +# shutdown-timeout 10 + +# When Redis receives a SIGINT or SIGTERM, shutdown is initiated and by default +# an RDB snapshot is written to disk in a blocking operation if save points are configured. +# The options used on signaled shutdown can include the following values: +# default: Saves RDB snapshot only if save points are configured. +# Waits for lagging replicas to catch up. +# save: Forces a DB saving operation even if no save points are configured. +# nosave: Prevents DB saving operation even if one or more save points are configured. +# now: Skips waiting for lagging replicas. +# force: Ignores any errors that would normally prevent the server from exiting. +# +# Any combination of values is allowed as long as "save" and "nosave" are not set simultaneously. +# Example: "nosave force now" +# +# shutdown-on-sigint default +# shutdown-on-sigterm default + +################ NON-DETERMINISTIC LONG BLOCKING COMMANDS ##################### + +# Maximum time in milliseconds for EVAL scripts, functions and in some cases +# modules' commands before Redis can start processing or rejecting other clients. +# +# If the maximum execution time is reached Redis will start to reply to most +# commands with a BUSY error. +# +# In this state Redis will only allow a handful of commands to be executed. +# For instance, SCRIPT KILL, FUNCTION KILL, SHUTDOWN NOSAVE and possibly some +# module specific 'allow-busy' commands. +# +# SCRIPT KILL and FUNCTION KILL will only be able to stop a script that did not +# yet call any write commands, so SHUTDOWN NOSAVE may be the only way to stop +# the server in the case a write command was already issued by the script when +# the user doesn't want to wait for the natural termination of the script. +# +# The default is 5 seconds. It is possible to set it to 0 or a negative value +# to disable this mechanism (uninterrupted execution). Note that in the past +# this config had a different name, which is now an alias, so both of these do +# the same: +# lua-time-limit 5000 +# busy-reply-threshold 5000 + +################################ REDIS CLUSTER ############################### + +# Normal Redis instances can't be part of a Redis Cluster; only nodes that are +# started as cluster nodes can. In order to start a Redis instance as a +# cluster node enable the cluster support uncommenting the following: +# +# cluster-enabled yes + +# Every cluster node has a cluster configuration file. This file is not +# intended to be edited by hand. It is created and updated by Redis nodes. +# Every Redis Cluster node requires a different cluster configuration file. +# Make sure that instances running in the same system do not have +# overlapping cluster configuration file names. +# +# cluster-config-file nodes-6379.conf + +# Cluster node timeout is the amount of milliseconds a node must be unreachable +# for it to be considered in failure state. +# Most other internal time limits are a multiple of the node timeout. +# +# cluster-node-timeout 15000 + +# The cluster port is the port that the cluster bus will listen for inbound connections on. When set +# to the default value, 0, it will be bound to the command port + 10000. Setting this value requires +# you to specify the cluster bus port when executing cluster meet. +# cluster-port 0 + +# A replica of a failing master will avoid to start a failover if its data +# looks too old. +# +# There is no simple way for a replica to actually have an exact measure of +# its "data age", so the following two checks are performed: +# +# 1) If there are multiple replicas able to failover, they exchange messages +# in order to try to give an advantage to the replica with the best +# replication offset (more data from the master processed). +# Replicas will try to get their rank by offset, and apply to the start +# of the failover a delay proportional to their rank. +# +# 2) Every single replica computes the time of the last interaction with +# its master. This can be the last ping or command received (if the master +# is still in the "connected" state), or the time that elapsed since the +# disconnection with the master (if the replication link is currently down). +# If the last interaction is too old, the replica will not try to failover +# at all. +# +# The point "2" can be tuned by user. Specifically a replica will not perform +# the failover if, since the last interaction with the master, the time +# elapsed is greater than: +# +# (node-timeout * cluster-replica-validity-factor) + repl-ping-replica-period +# +# So for example if node-timeout is 30 seconds, and the cluster-replica-validity-factor +# is 10, and assuming a default repl-ping-replica-period of 10 seconds, the +# replica will not try to failover if it was not able to talk with the master +# for longer than 310 seconds. +# +# A large cluster-replica-validity-factor may allow replicas with too old data to failover +# a master, while a too small value may prevent the cluster from being able to +# elect a replica at all. +# +# For maximum availability, it is possible to set the cluster-replica-validity-factor +# to a value of 0, which means, that replicas will always try to failover the +# master regardless of the last time they interacted with the master. +# (However they'll always try to apply a delay proportional to their +# offset rank). +# +# Zero is the only value able to guarantee that when all the partitions heal +# the cluster will always be able to continue. +# +# cluster-replica-validity-factor 10 + +# Cluster replicas are able to migrate to orphaned masters, that are masters +# that are left without working replicas. This improves the cluster ability +# to resist to failures as otherwise an orphaned master can't be failed over +# in case of failure if it has no working replicas. +# +# Replicas migrate to orphaned masters only if there are still at least a +# given number of other working replicas for their old master. This number +# is the "migration barrier". A migration barrier of 1 means that a replica +# will migrate only if there is at least 1 other working replica for its master +# and so forth. It usually reflects the number of replicas you want for every +# master in your cluster. +# +# Default is 1 (replicas migrate only if their masters remain with at least +# one replica). To disable migration just set it to a very large value or +# set cluster-allow-replica-migration to 'no'. +# A value of 0 can be set but is useful only for debugging and dangerous +# in production. +# +# cluster-migration-barrier 1 + +# Turning off this option allows to use less automatic cluster configuration. +# It both disables migration to orphaned masters and migration from masters +# that became empty. +# +# Default is 'yes' (allow automatic migrations). +# +# cluster-allow-replica-migration yes + +# By default Redis Cluster nodes stop accepting queries if they detect there +# is at least a hash slot uncovered (no available node is serving it). +# This way if the cluster is partially down (for example a range of hash slots +# are no longer covered) all the cluster becomes, eventually, unavailable. +# It automatically returns available as soon as all the slots are covered again. +# +# However sometimes you want the subset of the cluster which is working, +# to continue to accept queries for the part of the key space that is still +# covered. In order to do so, just set the cluster-require-full-coverage +# option to no. +# +# cluster-require-full-coverage yes + +# This option, when set to yes, prevents replicas from trying to failover its +# master during master failures. However the replica can still perform a +# manual failover, if forced to do so. +# +# This is useful in different scenarios, especially in the case of multiple +# data center operations, where we want one side to never be promoted if not +# in the case of a total DC failure. +# +# cluster-replica-no-failover no + +# This option, when set to yes, allows nodes to serve read traffic while the +# cluster is in a down state, as long as it believes it owns the slots. +# +# This is useful for two cases. The first case is for when an application +# doesn't require consistency of data during node failures or network partitions. +# One example of this is a cache, where as long as the node has the data it +# should be able to serve it. +# +# The second use case is for configurations that don't meet the recommended +# three shards but want to enable cluster mode and scale later. A +# master outage in a 1 or 2 shard configuration causes a read/write outage to the +# entire cluster without this option set, with it set there is only a write outage. +# Without a quorum of masters, slot ownership will not change automatically. +# +# cluster-allow-reads-when-down no + +# This option, when set to yes, allows nodes to serve pubsub shard traffic while +# the cluster is in a down state, as long as it believes it owns the slots. +# +# This is useful if the application would like to use the pubsub feature even when +# the cluster global stable state is not OK. If the application wants to make sure only +# one shard is serving a given channel, this feature should be kept as yes. +# +# cluster-allow-pubsubshard-when-down yes + +# Cluster link send buffer limit is the limit on the memory usage of an individual +# cluster bus link's send buffer in bytes. Cluster links would be freed if they exceed +# this limit. This is to primarily prevent send buffers from growing unbounded on links +# toward slow peers (E.g. PubSub messages being piled up). +# This limit is disabled by default. Enable this limit when 'mem_cluster_links' INFO field +# and/or 'send-buffer-allocated' entries in the 'CLUSTER LINKS` command output continuously increase. +# Minimum limit of 1gb is recommended so that cluster link buffer can fit in at least a single +# PubSub message by default. (client-query-buffer-limit default value is 1gb) +# +# cluster-link-sendbuf-limit 0 + +# Clusters can configure their announced hostname using this config. This is a common use case for +# applications that need to use TLS Server Name Indication (SNI) or dealing with DNS based +# routing. By default this value is only shown as additional metadata in the CLUSTER SLOTS +# command, but can be changed using 'cluster-preferred-endpoint-type' config. This value is +# communicated along the clusterbus to all nodes, setting it to an empty string will remove +# the hostname and also propagate the removal. +# +# cluster-announce-hostname "" + +# Clusters can advertise how clients should connect to them using either their IP address, +# a user defined hostname, or by declaring they have no endpoint. Which endpoint is +# shown as the preferred endpoint is set by using the cluster-preferred-endpoint-type +# config with values 'ip', 'hostname', or 'unknown-endpoint'. This value controls how +# the endpoint returned for MOVED/ASKING requests as well as the first field of CLUSTER SLOTS. +# If the preferred endpoint type is set to hostname, but no announced hostname is set, a '?' +# will be returned instead. +# +# When a cluster advertises itself as having an unknown endpoint, it's indicating that +# the server doesn't know how clients can reach the cluster. This can happen in certain +# networking situations where there are multiple possible routes to the node, and the +# server doesn't know which one the client took. In this case, the server is expecting +# the client to reach out on the same endpoint it used for making the last request, but use +# the port provided in the response. +# +# cluster-preferred-endpoint-type ip + +# In order to setup your cluster make sure to read the documentation +# available at https://redis.io web site. + +########################## CLUSTER DOCKER/NAT support ######################## + +# In certain deployments, Redis Cluster nodes address discovery fails, because +# addresses are NAT-ted or because ports are forwarded (the typical case is +# Docker and other containers). +# +# In order to make Redis Cluster working in such environments, a static +# configuration where each node knows its public address is needed. The +# following four options are used for this scope, and are: +# +# * cluster-announce-ip +# * cluster-announce-port +# * cluster-announce-tls-port +# * cluster-announce-bus-port +# +# Each instructs the node about its address, client ports (for connections +# without and with TLS) and cluster message bus port. The information is then +# published in the header of the bus packets so that other nodes will be able to +# correctly map the address of the node publishing the information. +# +# If cluster-tls is set to yes and cluster-announce-tls-port is omitted or set +# to zero, then cluster-announce-port refers to the TLS port. Note also that +# cluster-announce-tls-port has no effect if cluster-tls is set to no. +# +# If the above options are not used, the normal Redis Cluster auto-detection +# will be used instead. +# +# Note that when remapped, the bus port may not be at the fixed offset of +# clients port + 10000, so you can specify any port and bus-port depending +# on how they get remapped. If the bus-port is not set, a fixed offset of +# 10000 will be used as usual. +# +# Example: +# +# cluster-announce-ip 10.1.1.5 +# cluster-announce-tls-port 6379 +# cluster-announce-port 0 +# cluster-announce-bus-port 6380 + +################################## SLOW LOG ################################### + +# The Redis Slow Log is a system to log queries that exceeded a specified +# execution time. The execution time does not include the I/O operations +# like talking with the client, sending the reply and so forth, +# but just the time needed to actually execute the command (this is the only +# stage of command execution where the thread is blocked and can not serve +# other requests in the meantime). +# +# You can configure the slow log with two parameters: one tells Redis +# what is the execution time, in microseconds, to exceed in order for the +# command to get logged, and the other parameter is the length of the +# slow log. When a new command is logged the oldest one is removed from the +# queue of logged commands. + +# The following time is expressed in microseconds, so 1000000 is equivalent +# to one second. Note that a negative number disables the slow log, while +# a value of zero forces the logging of every command. +slowlog-log-slower-than 10000 + +# There is no limit to this length. Just be aware that it will consume memory. +# You can reclaim memory used by the slow log with SLOWLOG RESET. +slowlog-max-len 128 + +################################ LATENCY MONITOR ############################## + +# The Redis latency monitoring subsystem samples different operations +# at runtime in order to collect data related to possible sources of +# latency of a Redis instance. +# +# Via the LATENCY command this information is available to the user that can +# print graphs and obtain reports. +# +# The system only logs operations that were performed in a time equal or +# greater than the amount of milliseconds specified via the +# latency-monitor-threshold configuration directive. When its value is set +# to zero, the latency monitor is turned off. +# +# By default latency monitoring is disabled since it is mostly not needed +# if you don't have latency issues, and collecting data has a performance +# impact, that while very small, can be measured under big load. Latency +# monitoring can easily be enabled at runtime using the command +# "CONFIG SET latency-monitor-threshold " if needed. +latency-monitor-threshold 0 + +################################ LATENCY TRACKING ############################## + +# The Redis extended latency monitoring tracks the per command latencies and enables +# exporting the percentile distribution via the INFO latencystats command, +# and cumulative latency distributions (histograms) via the LATENCY command. +# +# By default, the extended latency monitoring is enabled since the overhead +# of keeping track of the command latency is very small. +# latency-tracking yes + +# By default the exported latency percentiles via the INFO latencystats command +# are the p50, p99, and p999. +# latency-tracking-info-percentiles 50 99 99.9 + +############################# EVENT NOTIFICATION ############################## + +# Redis can notify Pub/Sub clients about events happening in the key space. +# This feature is documented at https://redis.io/topics/notifications +# +# For instance if keyspace events notification is enabled, and a client +# performs a DEL operation on key "foo" stored in the Database 0, two +# messages will be published via Pub/Sub: +# +# PUBLISH __keyspace@0__:foo del +# PUBLISH __keyevent@0__:del foo +# +# It is possible to select the events that Redis will notify among a set +# of classes. Every class is identified by a single character: +# +# K Keyspace events, published with __keyspace@__ prefix. +# E Keyevent events, published with __keyevent@__ prefix. +# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... +# $ String commands +# l List commands +# s Set commands +# h Hash commands +# z Sorted set commands +# x Expired events (events generated every time a key expires) +# e Evicted events (events generated when a key is evicted for maxmemory) +# n New key events (Note: not included in the 'A' class) +# t Stream commands +# d Module key type events +# m Key-miss events (Note: It is not included in the 'A' class) +# A Alias for g$lshzxetd, so that the "AKE" string means all the events +# (Except key-miss events which are excluded from 'A' due to their +# unique nature). +# +# The "notify-keyspace-events" takes as argument a string that is composed +# of zero or multiple characters. The empty string means that notifications +# are disabled. +# +# Example: to enable list and generic events, from the point of view of the +# event name, use: +# +# notify-keyspace-events Elg +# +# Example 2: to get the stream of the expired keys subscribing to channel +# name __keyevent@0__:expired use: +# +# notify-keyspace-events Ex +# +# By default all notifications are disabled because most users don't need +# this feature and the feature has some overhead. Note that if you don't +# specify at least one of K or E, no events will be delivered. +notify-keyspace-events "" + +############################### ADVANCED CONFIG ############################### + +# Hashes are encoded using a memory efficient data structure when they have a +# small number of entries, and the biggest entry does not exceed a given +# threshold. These thresholds can be configured using the following directives. +hash-max-listpack-entries 512 +hash-max-listpack-value 64 + +# Lists are also encoded in a special way to save a lot of space. +# The number of entries allowed per internal list node can be specified +# as a fixed maximum size or a maximum number of elements. +# For a fixed maximum size, use -5 through -1, meaning: +# -5: max size: 64 Kb <-- not recommended for normal workloads +# -4: max size: 32 Kb <-- not recommended +# -3: max size: 16 Kb <-- probably not recommended +# -2: max size: 8 Kb <-- good +# -1: max size: 4 Kb <-- good +# Positive numbers mean store up to _exactly_ that number of elements +# per list node. +# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size), +# but if your use case is unique, adjust the settings as necessary. +list-max-listpack-size -2 + +# Lists may also be compressed. +# Compress depth is the number of quicklist ziplist nodes from *each* side of +# the list to *exclude* from compression. The head and tail of the list +# are always uncompressed for fast push/pop operations. Settings are: +# 0: disable all list compression +# 1: depth 1 means "don't start compressing until after 1 node into the list, +# going from either the head or tail" +# So: [head]->node->node->...->node->[tail] +# [head], [tail] will always be uncompressed; inner nodes will compress. +# 2: [head]->[next]->node->node->...->node->[prev]->[tail] +# 2 here means: don't compress head or head->next or tail->prev or tail, +# but compress all nodes between them. +# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail] +# etc. +list-compress-depth 0 + +# Sets have a special encoding in just one case: when a set is composed +# of just strings that happen to be integers in radix 10 in the range +# of 64 bit signed integers. +# The following configuration setting sets the limit in the size of the +# set in order to use this special memory saving encoding. +set-max-intset-entries 512 + +# Similarly to hashes and lists, sorted sets are also specially encoded in +# order to save a lot of space. This encoding is only used when the length and +# elements of a sorted set are below the following limits: +zset-max-listpack-entries 128 +zset-max-listpack-value 64 + +# HyperLogLog sparse representation bytes limit. The limit includes the +# 16 bytes header. When an HyperLogLog using the sparse representation crosses +# this limit, it is converted into the dense representation. +# +# A value greater than 16000 is totally useless, since at that point the +# dense representation is more memory efficient. +# +# The suggested value is ~ 3000 in order to have the benefits of +# the space efficient encoding without slowing down too much PFADD, +# which is O(N) with the sparse encoding. The value can be raised to +# ~ 10000 when CPU is not a concern, but space is, and the data set is +# composed of many HyperLogLogs with cardinality in the 0 - 15000 range. +hll-sparse-max-bytes 3000 + +# Streams macro node max size / items. The stream data structure is a radix +# tree of big nodes that encode multiple items inside. Using this configuration +# it is possible to configure how big a single node can be in bytes, and the +# maximum number of items it may contain before switching to a new node when +# appending new stream entries. If any of the following settings are set to +# zero, the limit is ignored, so for instance it is possible to set just a +# max entries limit by setting max-bytes to 0 and max-entries to the desired +# value. +stream-node-max-bytes 4096 +stream-node-max-entries 100 + +# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in +# order to help rehashing the main Redis hash table (the one mapping top-level +# keys to values). The hash table implementation Redis uses (see dict.c) +# performs a lazy rehashing: the more operation you run into a hash table +# that is rehashing, the more rehashing "steps" are performed, so if the +# server is idle the rehashing is never complete and some more memory is used +# by the hash table. +# +# The default is to use this millisecond 10 times every second in order to +# actively rehash the main dictionaries, freeing memory when possible. +# +# If unsure: +# use "activerehashing no" if you have hard latency requirements and it is +# not a good thing in your environment that Redis can reply from time to time +# to queries with 2 milliseconds delay. +# +# use "activerehashing yes" if you don't have such hard requirements but +# want to free memory asap when possible. +activerehashing yes + +# The client output buffer limits can be used to force disconnection of clients +# that are not reading data from the server fast enough for some reason (a +# common reason is that a Pub/Sub client can't consume messages as fast as the +# publisher can produce them). +# +# The limit can be set differently for the three different classes of clients: +# +# normal -> normal clients including MONITOR clients +# replica -> replica clients +# pubsub -> clients subscribed to at least one pubsub channel or pattern +# +# The syntax of every client-output-buffer-limit directive is the following: +# +# client-output-buffer-limit +# +# A client is immediately disconnected once the hard limit is reached, or if +# the soft limit is reached and remains reached for the specified number of +# seconds (continuously). +# So for instance if the hard limit is 32 megabytes and the soft limit is +# 16 megabytes / 10 seconds, the client will get disconnected immediately +# if the size of the output buffers reach 32 megabytes, but will also get +# disconnected if the client reaches 16 megabytes and continuously overcomes +# the limit for 10 seconds. +# +# By default normal clients are not limited because they don't receive data +# without asking (in a push way), but just after a request, so only +# asynchronous clients may create a scenario where data is requested faster +# than it can read. +# +# Instead there is a default limit for pubsub and replica clients, since +# subscribers and replicas receive data in a push fashion. +# +# Note that it doesn't make sense to set the replica clients output buffer +# limit lower than the repl-backlog-size config (partial sync will succeed +# and then replica will get disconnected). +# Such a configuration is ignored (the size of repl-backlog-size will be used). +# This doesn't have memory consumption implications since the replica client +# will share the backlog buffers memory. +# +# Both the hard or the soft limit can be disabled by setting them to zero. +client-output-buffer-limit normal 0 0 0 +client-output-buffer-limit replica 256mb 64mb 60 +client-output-buffer-limit pubsub 32mb 8mb 60 + +# Client query buffers accumulate new commands. They are limited to a fixed +# amount by default in order to avoid that a protocol desynchronization (for +# instance due to a bug in the client) will lead to unbound memory usage in +# the query buffer. However you can configure it here if you have very special +# needs, such us huge multi/exec requests or alike. +# +# client-query-buffer-limit 1gb + +# In some scenarios client connections can hog up memory leading to OOM +# errors or data eviction. To avoid this we can cap the accumulated memory +# used by all client connections (all pubsub and normal clients). Once we +# reach that limit connections will be dropped by the server freeing up +# memory. The server will attempt to drop the connections using the most +# memory first. We call this mechanism "client eviction". +# +# Client eviction is configured using the maxmemory-clients setting as follows: +# 0 - client eviction is disabled (default) +# +# A memory value can be used for the client eviction threshold, +# for example: +# maxmemory-clients 1g +# +# A percentage value (between 1% and 100%) means the client eviction threshold +# is based on a percentage of the maxmemory setting. For example to set client +# eviction at 5% of maxmemory: +# maxmemory-clients 5% + +# In the Redis protocol, bulk requests, that are, elements representing single +# strings, are normally limited to 512 mb. However you can change this limit +# here, but must be 1mb or greater +# +# proto-max-bulk-len 512mb + +# Redis calls an internal function to perform many background tasks, like +# closing connections of clients in timeout, purging expired keys that are +# never requested, and so forth. +# +# Not all tasks are performed with the same frequency, but Redis checks for +# tasks to perform according to the specified "hz" value. +# +# By default "hz" is set to 10. Raising the value will use more CPU when +# Redis is idle, but at the same time will make Redis more responsive when +# there are many keys expiring at the same time, and timeouts may be +# handled with more precision. +# +# The range is between 1 and 500, however a value over 100 is usually not +# a good idea. Most users should use the default of 10 and raise this up to +# 100 only in environments where very low latency is required. +hz 10 + +# Normally it is useful to have an HZ value which is proportional to the +# number of clients connected. This is useful in order, for instance, to +# avoid too many clients are processed for each background task invocation +# in order to avoid latency spikes. +# +# Since the default HZ value by default is conservatively set to 10, Redis +# offers, and enables by default, the ability to use an adaptive HZ value +# which will temporarily raise when there are many connected clients. +# +# When dynamic HZ is enabled, the actual configured HZ will be used +# as a baseline, but multiples of the configured HZ value will be actually +# used as needed once more clients are connected. In this way an idle +# instance will use very little CPU time while a busy instance will be +# more responsive. +dynamic-hz yes + +# When a child rewrites the AOF file, if the following option is enabled +# the file will be fsync-ed every 4 MB of data generated. This is useful +# in order to commit the file to the disk more incrementally and avoid +# big latency spikes. +aof-rewrite-incremental-fsync yes + +# When redis saves RDB file, if the following option is enabled +# the file will be fsync-ed every 4 MB of data generated. This is useful +# in order to commit the file to the disk more incrementally and avoid +# big latency spikes. +rdb-save-incremental-fsync yes + +# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good +# idea to start with the default settings and only change them after investigating +# how to improve the performances and how the keys LFU change over time, which +# is possible to inspect via the OBJECT FREQ command. +# +# There are two tunable parameters in the Redis LFU implementation: the +# counter logarithm factor and the counter decay time. It is important to +# understand what the two parameters mean before changing them. +# +# The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis +# uses a probabilistic increment with logarithmic behavior. Given the value +# of the old counter, when a key is accessed, the counter is incremented in +# this way: +# +# 1. A random number R between 0 and 1 is extracted. +# 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1). +# 3. The counter is incremented only if R < P. +# +# The default lfu-log-factor is 10. This is a table of how the frequency +# counter changes with a different number of accesses with different +# logarithmic factors: +# +# +--------+------------+------------+------------+------------+------------+ +# | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits | +# +--------+------------+------------+------------+------------+------------+ +# | 0 | 104 | 255 | 255 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 1 | 18 | 49 | 255 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 10 | 10 | 18 | 142 | 255 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# | 100 | 8 | 11 | 49 | 143 | 255 | +# +--------+------------+------------+------------+------------+------------+ +# +# NOTE: The above table was obtained by running the following commands: +# +# redis-benchmark -n 1000000 incr foo +# redis-cli object freq foo +# +# NOTE 2: The counter initial value is 5 in order to give new objects a chance +# to accumulate hits. +# +# The counter decay time is the time, in minutes, that must elapse in order +# for the key counter to be divided by two (or decremented if it has a value +# less <= 10). +# +# The default value for the lfu-decay-time is 1. A special value of 0 means to +# decay the counter every time it happens to be scanned. +# +# lfu-log-factor 10 +# lfu-decay-time 1 + +########################### ACTIVE DEFRAGMENTATION ####################### +# +# What is active defragmentation? +# ------------------------------- +# +# Active (online) defragmentation allows a Redis server to compact the +# spaces left between small allocations and deallocations of data in memory, +# thus allowing to reclaim back memory. +# +# Fragmentation is a natural process that happens with every allocator (but +# less so with Jemalloc, fortunately) and certain workloads. Normally a server +# restart is needed in order to lower the fragmentation, or at least to flush +# away all the data and create it again. However thanks to this feature +# implemented by Oran Agra for Redis 4.0 this process can happen at runtime +# in a "hot" way, while the server is running. +# +# Basically when the fragmentation is over a certain level (see the +# configuration options below) Redis will start to create new copies of the +# values in contiguous memory regions by exploiting certain specific Jemalloc +# features (in order to understand if an allocation is causing fragmentation +# and to allocate it in a better place), and at the same time, will release the +# old copies of the data. This process, repeated incrementally for all the keys +# will cause the fragmentation to drop back to normal values. +# +# Important things to understand: +# +# 1. This feature is disabled by default, and only works if you compiled Redis +# to use the copy of Jemalloc we ship with the source code of Redis. +# This is the default with Linux builds. +# +# 2. You never need to enable this feature if you don't have fragmentation +# issues. +# +# 3. Once you experience fragmentation, you can enable this feature when +# needed with the command "CONFIG SET activedefrag yes". +# +# The configuration parameters are able to fine tune the behavior of the +# defragmentation process. If you are not sure about what they mean it is +# a good idea to leave the defaults untouched. + +# Active defragmentation is disabled by default +# activedefrag no + +# Minimum amount of fragmentation waste to start active defrag +# active-defrag-ignore-bytes 100mb + +# Minimum percentage of fragmentation to start active defrag +# active-defrag-threshold-lower 10 + +# Maximum percentage of fragmentation at which we use maximum effort +# active-defrag-threshold-upper 100 + +# Minimal effort for defrag in CPU percentage, to be used when the lower +# threshold is reached +# active-defrag-cycle-min 1 + +# Maximal effort for defrag in CPU percentage, to be used when the upper +# threshold is reached +# active-defrag-cycle-max 25 + +# Maximum number of set/hash/zset/list fields that will be processed from +# the main dictionary scan +# active-defrag-max-scan-fields 1000 + +# Jemalloc background thread for purging will be enabled by default +jemalloc-bg-thread yes + +# It is possible to pin different threads and processes of Redis to specific +# CPUs in your system, in order to maximize the performances of the server. +# This is useful both in order to pin different Redis threads in different +# CPUs, but also in order to make sure that multiple Redis instances running +# in the same host will be pinned to different CPUs. +# +# Normally you can do this using the "taskset" command, however it is also +# possible to this via Redis configuration directly, both in Linux and FreeBSD. +# +# You can pin the server/IO threads, bio threads, aof rewrite child process, and +# the bgsave child process. The syntax to specify the cpu list is the same as +# the taskset command: +# +# Set redis server/io threads to cpu affinity 0,2,4,6: +# server_cpulist 0-7:2 +# +# Set bio threads to cpu affinity 1,3: +# bio_cpulist 1,3 +# +# Set aof rewrite child process to cpu affinity 8,9,10,11: +# aof_rewrite_cpulist 8-11 +# +# Set bgsave child process to cpu affinity 1,10,11 +# bgsave_cpulist 1,10-11 + +# In some cases redis will emit warnings and even refuse to start if it detects +# that the system is in bad state, it is possible to suppress these warnings +# by setting the following config which takes a space delimited list of warnings +# to suppress +# +# ignore-warnings ARM64-COW-BUG