Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 10.1.7-MariaDB-log Source distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> update performance_schema.setup_consumers set enabled='yes'; Query OK, 8 rows affected (0.00 sec) Rows matched: 12 Changed: 8 Warnings: 0 MariaDB [(none)]> update performance_schema.setup_instruments set enabled='yes', timed='yes'; Query OK, 412 rows affected (0.04 sec) Rows matched: 642 Changed: 412 Warnings: 0 MariaDB [(none)]> update performance_schema.setup_objects set enabled = 'yes', timed = 'yes' where object_schema in ( 'mysql', 'information_schema'); Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 MariaDB [(none)]> select event_name, count_star, sum_timer_wait from performance_schema.events_statements_summary_global_by_event_name order by sum_timer_wait desc limit 50; +----------------------------------+------------+----------------+ | event_name | count_star | sum_timer_wait | +----------------------------------+------------+----------------+ | statement/sql/update | 3 | 35502627000 | | statement/sql/select | 1 | 132000000 | | statement/sql/drop_db | 0 | 0 | | statement/sql/create_db | 0 | 0 | | statement/sql/change_db | 0 | 0 | | statement/sql/grant | 0 | 0 | | statement/sql/unlock_tables | 0 | 0 | | statement/sql/lock_tables | 0 | 0 | | statement/sql/set_option | 0 | 0 | | statement/sql/load | 0 | 0 | | statement/sql/show_triggers | 0 | 0 | | statement/sql/show_table_status | 0 | 0 | | statement/sql/alter_db | 0 | 0 | | statement/sql/repair | 0 | 0 | | statement/sql/replace | 0 | 0 | | statement/sql/kill | 0 | 0 | | statement/sql/flush | 0 | 0 | | statement/sql/preload_keys | 0 | 0 | | statement/sql/assign_to_keycache | 0 | 0 | | statement/sql/check | 0 | 0 | | statement/sql/optimize | 0 | 0 | | statement/sql/revoke | 0 | 0 | | statement/sql/drop_function | 0 | 0 | | statement/sql/create_udf | 0 | 0 | | statement/sql/replace_select | 0 | 0 | | statement/sql/show_create_db | 0 | 0 | | statement/sql/show_collations | 0 | 0 | | statement/sql/show_charsets | 0 | 0 | | statement/sql/show_tables | 0 | 0 | | statement/sql/show_databases | 0 | 0 | | statement/sql/drop_index | 0 | 0 | | statement/sql/drop_table | 0 | 0 | | statement/sql/truncate | 0 | 0 | | statement/sql/delete | 0 | 0 | | statement/sql/insert_select | 0 | 0 | | statement/sql/insert | 0 | 0 | | statement/sql/alter_table | 0 | 0 | | statement/sql/create_index | 0 | 0 | | statement/sql/show_fields | 0 | 0 | | statement/sql/show_keys | 0 | 0 | | statement/sql/show_create_table | 0 | 0 | | statement/sql/show_grants | 0 | 0 | | statement/sql/show_slave_status | 0 | 0 | | statement/sql/show_master_status | 0 | 0 | | statement/sql/show_processlist | 0 | 0 | | statement/sql/show_engine_mutex | 0 | 0 | | statement/sql/show_engine_status | 0 | 0 | | statement/sql/show_engine_logs | 0 | 0 | | statement/sql/show_status | 0 | 0 | | statement/sql/show_variables | 0 | 0 | +----------------------------------+------------+----------------+ 50 rows in set (0.00 sec) MariaDB [(none)]> select event_name, count_star, sum_timer_wait from performance_schema.events_waits_summary_global_by_event_name order by sum_timer_wait desc limit 50; +-----------------------------------------------------------+------------+----------------+ | event_name | count_star | sum_timer_wait | +-----------------------------------------------------------+------------+----------------+ | idle | 12 | 97763364000000 | | wait/io/file/innodb/innodb_log_file | 19 | 246087129600 | | wait/io/file/innodb/innodb_data_file | 1073 | 139664635032 | | wait/io/file/sql/FRM | 92 | 305999616 | | wait/io/file/sql/query_log | 11 | 169929552 | | wait/io/file/myisam/kfile | 75 | 133037736 | | wait/io/file/myisam/dfile | 108 | 132307656 | | wait/io/file/sql/pid | 3 | 92852136 | | wait/io/file/sql/ERRMSG | 5 | 88320024 | | wait/io/file/sql/casetest | 5 | 64484160 | | wait/io/file/sql/dbopt | 6 | 49823280 | | wait/io/file/aria/translog | 8 | 39944112 | | wait/io/file/mysys/charset | 3 | 24310416 | | wait/io/file/aria/control | 3 | 7898904 | | wait/io/file/sql/global_ddl_log | 2 | 3609528 | | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | 8 | 2908464 | | wait/synch/mutex/sql/Master_info::run_lock | 0 | 0 | | wait/synch/mutex/sql/TABLE_SHARE::LOCK_share | 0 | 0 | | wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data | 0 | 0 | | wait/synch/mutex/sql/Query_cache::structure_guard_mutex | 0 | 0 | | wait/synch/mutex/sql/Rpl_group_info::sleep_lock | 0 | 0 | | wait/synch/mutex/sql/Relay_log_info::run_lock | 0 | 0 | | wait/synch/mutex/sql/Relay_log_info::log_space_lock | 0 | 0 | | wait/synch/mutex/sql/LOCK_uuid_short_generator | 0 | 0 | | wait/synch/mutex/sql/LOG::LOCK_log | 0 | 0 | | wait/synch/mutex/sql/Master_info::data_lock | 0 | 0 | | wait/synch/mutex/sql/Relay_log_info::data_lock | 0 | 0 | | wait/synch/mutex/sql/Slave_reporting_capability::err_lock | 0 | 0 | | wait/synch/mutex/sql/Master_info::sleep_lock | 0 | 0 | | wait/synch/mutex/sql/LOCK_error_log | 0 | 0 | | wait/synch/mutex/sql/LOCK_global_user_client_stats | 0 | 0 | | wait/synch/mutex/sql/LOCK_stats | 0 | 0 | | wait/synch/mutex/sql/LOCK_active_mi | 0 | 0 | | wait/synch/mutex/sql/hash_filo::lock | 0 | 0 | | wait/synch/mutex/sql/Delayed_insert::mutex | 0 | 0 | | wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index | 0 | 0 | | wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_binlog_end_pos | 0 | 0 | | wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index | 0 | 0 | | wait/synch/mutex/sql/LOCK_des_key_file | 0 | 0 | | wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_pending_checkpoint | 0 | 0 | | wait/synch/mutex/sql/LOCK_connection_count | 0 | 0 | | wait/synch/mutex/sql/LOCK_gdl | 0 | 0 | | wait/synch/mutex/sql/LOCK_system_variables_hash | 0 | 0 | | wait/synch/mutex/sql/LOCK_show_status | 0 | 0 | | wait/synch/mutex/sql/LOCK_status | 0 | 0 | | wait/synch/mutex/sql/LOCK_server_started | 0 | 0 | | wait/synch/mutex/sql/LOCK_rpl_status | 0 | 0 | | wait/synch/mutex/sql/LOCK_prepared_stmt_count | 0 | 0 | | wait/synch/mutex/sql/LOCK_manager | 0 | 0 | | wait/synch/mutex/sql/LOCK_global_system_variables | 0 | 0 | +-----------------------------------------------------------+------------+----------------+ 50 rows in set (0.01 sec) MariaDB [(none)]> select event_name, count_star, sum_timer_wait from performance_schema.events_stages_summary_global_by_event_name order by sum_timer_wait desc limit 50; +-----------------------------------------------------------------------------+------------+----------------+ | event_name | count_star | sum_timer_wait | +-----------------------------------------------------------------------------+------------+----------------+ | stage/sql/Sorting result | 2 | 8095023000 | | stage/sql/updating | 1 | 698133000 | | stage/sql/Opening tables | 4 | 641912000 | | stage/sql/init | 8 | 398444000 | | stage/sql/Sending data | 2 | 76267000 | | stage/sql/Unlocking tables | 4 | 45466000 | | stage/sql/preparing | 3 | 35200000 | | stage/sql/statistics | 3 | 33733000 | | stage/sql/checking permissions | 4 | 28355000 | | stage/sql/end | 4 | 19555000 | | stage/sql/freeing items | 4 | 17600000 | | stage/sql/optimizing | 3 | 14178000 | | stage/sql/query end | 4 | 14178000 | | stage/sql/cleaning up | 4 | 9289000 | | stage/sql/Table lock | 4 | 8800000 | | stage/sql/closing tables | 4 | 8312000 | | stage/sql/System lock | 4 | 5867000 | | stage/sql/After opening tables | 4 | 5867000 | | stage/sql/executing | 3 | 5866000 | | stage/sql/Making temporary file (append) before replaying LOAD DATA INFILE. | 0 | 0 | | stage/sql/Killing slave | 0 | 0 | | stage/sql/invalidating query cache entries (table list) | 0 | 0 | | stage/aria/Waiting for a resource | 0 | 0 | | stage/sql/Flushing relay-log info file. | 0 | 0 | | stage/sql/invalidating query cache entries (table) | 0 | 0 | | stage/sql/FULLTEXT initialization | 0 | 0 | | stage/sql/got handler lock | 0 | 0 | | stage/sql/insert | 0 | 0 | | stage/sql/Flushing relay log and master info repository. | 0 | 0 | | stage/sql/got old table | 0 | 0 | | stage/sql/logging slow query | 0 | 0 | | stage/sql/Connecting to master | 0 | 0 | | stage/sql/discard_or_import_tablespace | 0 | 0 | | stage/sql/altering table | 0 | 0 | | stage/sql/committing alter table to storage engine | 0 | 0 | | stage/sql/Processing binlog checkpoint notification | 0 | 0 | | stage/sql/Stopping binlog background thread | 0 | 0 | | stage/sql/Waiting for background binlog tasks | 0 | 0 | | stage/sql/Changing master | 0 | 0 | | stage/sql/Checking master version | 0 | 0 | | stage/sql/converting HEAP to Aria | 0 | 0 | | stage/sql/copy to tmp table | 0 | 0 | | stage/sql/Copying to group table | 0 | 0 | | stage/sql/Copying to tmp table | 0 | 0 | | stage/sql/Creating delayed handler | 0 | 0 | | stage/sql/Creating sort index | 0 | 0 | | stage/sql/creating table | 0 | 0 | | stage/sql/Creating tmp table | 0 | 0 | | stage/sql/deleting from main table | 0 | 0 | | stage/sql/deleting from reference tables | 0 | 0 | +-----------------------------------------------------------------------------+------------+----------------+ 50 rows in set (0.00 sec) MariaDB [(none)]> select event_name, count_star, sum_timer_wait from performance_schema.file_summary_by_event_name order by sum_timer_wait desc limit 50; +--------------------------------------+------------+----------------+ | event_name | count_star | sum_timer_wait | +--------------------------------------+------------+----------------+ | wait/io/file/innodb/innodb_log_file | 19 | 246087129600 | | wait/io/file/innodb/innodb_data_file | 1073 | 139664635032 | | wait/io/file/sql/FRM | 94 | 314986152 | | wait/io/file/sql/query_log | 13 | 185685864 | | wait/io/file/myisam/kfile | 75 | 133037736 | | wait/io/file/myisam/dfile | 108 | 132307656 | | wait/io/file/sql/pid | 3 | 92852136 | | wait/io/file/sql/ERRMSG | 5 | 88320024 | | wait/io/file/sql/casetest | 5 | 64484160 | | wait/io/file/sql/dbopt | 6 | 49823280 | | wait/io/file/aria/translog | 8 | 39944112 | | wait/io/file/mysys/charset | 3 | 24310416 | | wait/io/file/aria/control | 3 | 7898904 | | wait/io/file/sql/global_ddl_log | 2 | 3609528 | | wait/io/file/myisam/data_tmp | 0 | 0 | | wait/io/file/mysys/cnf | 0 | 0 | | wait/io/file/sql/partition | 0 | 0 | | wait/io/file/mysys/proc_meminfo | 0 | 0 | | wait/io/file/myisam/log | 0 | 0 | | wait/io/file/myisammrg/MRG | 0 | 0 | | wait/io/file/innodb/innodb_temp_file | 0 | 0 | | wait/io/file/archive/data | 0 | 0 | | wait/io/file/archive/metadata | 0 | 0 | | wait/io/file/aria/MAD | 0 | 0 | | wait/io/file/aria/MAI | 0 | 0 | | wait/io/file/csv/update | 0 | 0 | | wait/io/file/csv/data | 0 | 0 | | wait/io/file/csv/metadata | 0 | 0 | | wait/io/file/sql/binlog_state | 0 | 0 | | wait/io/file/sql/init | 0 | 0 | | wait/io/file/sql/load | 0 | 0 | | wait/io/file/sql/map | 0 | 0 | | wait/io/file/sql/file_parser | 0 | 0 | | wait/io/file/sql/select_to_file | 0 | 0 | | wait/io/file/sql/des_key_file | 0 | 0 | | wait/io/file/sql/relaylog_index | 0 | 0 | | wait/io/file/sql/relaylog | 0 | 0 | | wait/io/file/sql/binlog_index | 0 | 0 | | wait/io/file/sql/LOAD_FILE | 0 | 0 | | wait/io/file/sql/log_event_data | 0 | 0 | | wait/io/file/sql/log_event_info | 0 | 0 | | wait/io/file/sql/trigger | 0 | 0 | | wait/io/file/sql/trigger_name | 0 | 0 | | wait/io/file/sql/tclog | 0 | 0 | | wait/io/file/sql/slow_log | 0 | 0 | | wait/io/file/sql/send_file | 0 | 0 | | wait/io/file/sql/relay_log_info | 0 | 0 | | wait/io/file/sql/misc | 0 | 0 | | wait/io/file/sql/master_info | 0 | 0 | | wait/io/file/sql/binlog | 0 | 0 | +--------------------------------------+------------+----------------+ 50 rows in set (0.00 sec) MariaDB [(none)]> select file_name, event_name, count_star, sum_timer_wait from performance_schema.file_summary_by_instance order by sum_timer_wait desc limit 50; +-----------------------------------------------------+--------------------------------------+------------+----------------+ | file_name | event_name | count_star | sum_timer_wait | +-----------------------------------------------------+--------------------------------------+------------+----------------+ | /mnt/data/mysql/ib_logfile0 | wait/io/file/innodb/innodb_log_file | 11 | 183593112456 | | /mnt/data/mysql/ibdata1 | wait/io/file/innodb/innodb_data_file | 508 | 137693625888 | | /mnt/data/mysql/ib_logfile1 | wait/io/file/innodb/innodb_log_file | 8 | 62494017144 | | /tmp/mysql.sql | wait/io/file/sql/query_log | 14 | 193266216 | | /mnt/data/mysql/mysql/innodb_table_stats.ibd | wait/io/file/innodb/innodb_data_file | 9 | 123530784 | | /mnt/data/mysql/mysql/innodb_index_stats.ibd | wait/io/file/innodb/innodb_data_file | 11 | 114040368 | | /run/mysqld/mysqld.pid | wait/io/file/sql/pid | 3 | 92852136 | | /usr/share/mysql/english/errmsg.sys | wait/io/file/sql/ERRMSG | 5 | 88320024 | | /mnt/data/mysql/mysql/gtid_slave_pos.ibd | wait/io/file/innodb/innodb_data_file | 9 | 87848280 | | /mnt/data/mysql/mysql/gtid_slave_pos.frm | wait/io/file/sql/FRM | 4 | 52553904 | | /mnt/data/mysql/performance_schema/db.opt | wait/io/file/sql/dbopt | 6 | 49823280 | | /mnt/data/mysql/aria_log.00000001 | wait/io/file/aria/translog | 8 | 39944112 | | /mnt/data/mysql/mysql/plugin.frm | wait/io/file/sql/FRM | 7 | 38575368 | | /mnt/data/mysql/ciphers/ciphers.ibd | wait/io/file/innodb/innodb_data_file | 3 | 30293952 | | /usr/share/mysql/charsets/Index.xml | wait/io/file/mysys/charset | 3 | 24310416 | | /mnt/data/mysql/mysql/tables_priv.MYD | wait/io/file/myisam/dfile | 29 | 22698312 | | /mnt/data/mysql/mysql/columns_priv.MYD | wait/io/file/myisam/dfile | 33 | 21807552 | | /mnt/data/mysql/mysql/host.frm | wait/io/file/sql/FRM | 7 | 16719456 | | /mnt/data/mysql/mysql/func.frm | wait/io/file/sql/FRM | 4 | 13206024 | | /mnt/data/mysql/mysql/servers.frm | wait/io/file/sql/FRM | 4 | 13186368 | | /mnt/data/mysql/mysql/db.MYD | wait/io/file/myisam/dfile | 5 | 12113712 | | /mnt/data/mysql/mysql/time_zone_transition.frm | wait/io/file/sql/FRM | 4 | 12095304 | | /mnt/data/mysql/dwswwikidb/user.ibd | wait/io/file/innodb/innodb_data_file | 3 | 11650080 | | /mnt/data/mysql/mysql/time_zone_transition_type.frm | wait/io/file/sql/FRM | 4 | 11393928 | | /mnt/data/mysql/mysql/time_zone_name.frm | wait/io/file/sql/FRM | 4 | 11354304 | | /mnt/data/mysql/mysql/plugin.MYI | wait/io/file/myisam/kfile | 5 | 11208288 | | /mnt/data/mysql/mysql/user.frm | wait/io/file/sql/FRM | 4 | 11158056 | | /mnt/data/mysql/mysql/time_zone.frm | wait/io/file/sql/FRM | 4 | 11155560 | | /mnt/data/mysql/mysql/time_zone_leap_second.frm | wait/io/file/sql/FRM | 4 | 10856352 | | /mnt/data/mysql/dwswwikidb/archive.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10528440 | | /mnt/data/mysql/wiki/user_newtalk.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10471656 | | /mnt/data/mysql/wiki/querycache.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10317216 | | /mnt/data/mysql/wiki_rezepte/site_identifiers.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10272912 | | /mnt/data/mysql/mysql/roles_mapping.frm | wait/io/file/sql/FRM | 7 | 10187424 | | /mnt/data/mysql/mysql/proxies_priv.frm | wait/io/file/sql/FRM | 7 | 10121592 | | /mnt/data/mysql/wiki/site_stats.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10116912 | | /mnt/data/mysql/wiki_rezepte/langlinks.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10084152 | | /mnt/data/mysql/wiki/watchlist.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10079472 | | /mnt/data/mysql/wiki/templatelinks.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10067928 | | /mnt/data/mysql/wiki_rezepte/user_former_groups.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10065432 | | /mnt/data/mysql/wiki/user_properties.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10031424 | | /mnt/data/mysql/wiki_rezepte/archive.ibd | wait/io/file/innodb/innodb_data_file | 3 | 10031112 | | /mnt/data/mysql/mysql/procs_priv.frm | wait/io/file/sql/FRM | 7 | 10003344 | | /mnt/data/mysql/dwswwikidb/user_newtalk.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9990240 | | /mnt/data/mysql/wiki_rezepte/log_search.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9972768 | | /mnt/data/mysql/wiki/watchlist.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9933456 | | /mnt/data/mysql/wiki_rezepte/image.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9926280 | | /mnt/data/mysql/dwswwikidb/job.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9913800 | | /mnt/data/mysql/wiki_rezepte/querycachetwo.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9893832 | | /mnt/data/mysql/wiki_rezepte/page.ibd | wait/io/file/innodb/innodb_data_file | 3 | 9850152 | +-----------------------------------------------------+--------------------------------------+------------+----------------+ 50 rows in set (0.00 sec) MariaDB [(none)]> select object_type, object_schema, object_name, count_star, sum_timer_wait from performance_schema.objects_summary_global_by_type order by sum_timer_wait desc limit 50; +-------------+--------------------+------------------------------------------------+------------+----------------+ | object_type | object_schema | object_name | count_star | sum_timer_wait | +-------------+--------------------+------------------------------------------------+------------+----------------+ | TABLE | mysql | plugin | 0 | 0 | | TABLE | mysql | func | 0 | 0 | | TABLE | mysql | event | 0 | 0 | | TABLE | mysql | gtid_slave_pos | 0 | 0 | | TABLE | performance_schema | setup_consumers | 0 | 0 | | TABLE | performance_schema | setup_instruments | 0 | 0 | | TABLE | performance_schema | setup_objects | 0 | 0 | | TABLE | performance_schema | events_statements_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_waits_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_stages_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_instance | 0 | 0 | | TABLE | mysql | procs_priv | 0 | 0 | | TABLE | mysql | columns_priv | 0 | 0 | | TABLE | mysql | tables_priv | 0 | 0 | | TABLE | mysql | servers | 0 | 0 | | TABLE | mysql | user | 0 | 0 | | TABLE | mysql | db | 0 | 0 | | TABLE | mysql | host | 0 | 0 | | TABLE | mysql | proxies_priv | 0 | 0 | | TABLE | mysql | roles_mapping | 0 | 0 | | TABLE | mysql | time_zone_leap_second | 0 | 0 | | TABLE | mysql | time_zone_name | 0 | 0 | | TABLE | mysql | time_zone | 0 | 0 | | TABLE | mysql | time_zone_transition_type | 0 | 0 | | TABLE | mysql | time_zone_transition | 0 | 0 | | TABLE | performance_schema | objects_summary_global_by_type | 0 | 0 | +-------------+--------------------+------------------------------------------------+------------+----------------+ 27 rows in set (0.00 sec) MariaDB [(none)]> select event_name, count_star, sum_timer_wait from performance_schema.socket_summary_by_event_name order by sum_timer_wait desc limit 50; +----------------------------------------+------------+----------------+ | event_name | count_star | sum_timer_wait | +----------------------------------------+------------+----------------+ | wait/io/socket/sql/server_tcpip_socket | 0 | 0 | | wait/io/socket/sql/server_unix_socket | 0 | 0 | | wait/io/socket/sql/client_connection | 0 | 0 | +----------------------------------------+------------+----------------+ 3 rows in set (0.00 sec) MariaDB [(none)]> select object_type, object_schema, object_name, count_star, sum_timer_wait from performance_schema.table_io_waits_summary_by_table order by sum_timer_wait desc limit 50; +-------------+--------------------+------------------------------------------------+------------+----------------+ | object_type | object_schema | object_name | count_star | sum_timer_wait | +-------------+--------------------+------------------------------------------------+------------+----------------+ | TABLE | mysql | plugin | 0 | 0 | | TABLE | mysql | event | 0 | 0 | | TABLE | mysql | gtid_slave_pos | 0 | 0 | | TABLE | performance_schema | setup_consumers | 0 | 0 | | TABLE | performance_schema | setup_instruments | 0 | 0 | | TABLE | performance_schema | setup_objects | 0 | 0 | | TABLE | performance_schema | events_statements_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_waits_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_stages_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_instance | 0 | 0 | | TABLE | performance_schema | objects_summary_global_by_type | 0 | 0 | | TABLE | performance_schema | socket_summary_by_event_name | 0 | 0 | | TABLE | mysql | func | 0 | 0 | | TABLE | mysql | procs_priv | 0 | 0 | | TABLE | mysql | columns_priv | 0 | 0 | | TABLE | mysql | servers | 0 | 0 | | TABLE | mysql | user | 0 | 0 | | TABLE | mysql | db | 0 | 0 | | TABLE | mysql | host | 0 | 0 | | TABLE | mysql | proxies_priv | 0 | 0 | | TABLE | mysql | roles_mapping | 0 | 0 | | TABLE | mysql | time_zone_leap_second | 0 | 0 | | TABLE | mysql | time_zone_name | 0 | 0 | | TABLE | mysql | time_zone | 0 | 0 | | TABLE | mysql | time_zone_transition_type | 0 | 0 | | TABLE | mysql | time_zone_transition | 0 | 0 | | TABLE | mysql | tables_priv | 0 | 0 | | TABLE | performance_schema | table_io_waits_summary_by_table | 0 | 0 | +-------------+--------------------+------------------------------------------------+------------+----------------+ 29 rows in set (0.00 sec) MariaDB [(none)]> select object_type, object_schema, object_name, count_star, sum_timer_wait from performance_schema.table_lock_waits_summary_by_table order by sum_timer_wait desc limit 50; +-------------+--------------------+------------------------------------------------+------------+----------------+ | object_type | object_schema | object_name | count_star | sum_timer_wait | +-------------+--------------------+------------------------------------------------+------------+----------------+ | TABLE | mysql | plugin | 0 | 0 | | TABLE | mysql | event | 0 | 0 | | TABLE | mysql | gtid_slave_pos | 0 | 0 | | TABLE | performance_schema | setup_consumers | 0 | 0 | | TABLE | performance_schema | setup_instruments | 0 | 0 | | TABLE | performance_schema | setup_objects | 0 | 0 | | TABLE | performance_schema | events_statements_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_waits_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | events_stages_summary_global_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_event_name | 0 | 0 | | TABLE | performance_schema | file_summary_by_instance | 0 | 0 | | TABLE | performance_schema | objects_summary_global_by_type | 0 | 0 | | TABLE | performance_schema | socket_summary_by_event_name | 0 | 0 | | TABLE | performance_schema | table_io_waits_summary_by_table | 0 | 0 | | TABLE | mysql | func | 0 | 0 | | TABLE | mysql | procs_priv | 0 | 0 | | TABLE | mysql | servers | 0 | 0 | | TABLE | mysql | user | 0 | 0 | | TABLE | mysql | db | 0 | 0 | | TABLE | mysql | host | 0 | 0 | | TABLE | mysql | proxies_priv | 0 | 0 | | TABLE | mysql | roles_mapping | 0 | 0 | | TABLE | mysql | time_zone_leap_second | 0 | 0 | | TABLE | mysql | time_zone_name | 0 | 0 | | TABLE | mysql | time_zone | 0 | 0 | | TABLE | mysql | time_zone_transition_type | 0 | 0 | | TABLE | mysql | time_zone_transition | 0 | 0 | | TABLE | mysql | tables_priv | 0 | 0 | | TABLE | mysql | columns_priv | 0 | 0 | | TABLE | performance_schema | table_lock_waits_summary_by_table | 0 | 0 | +-------------+--------------------+------------------------------------------------+------------+----------------+ 30 rows in set (0.00 sec) MariaDB [(none)]> select * from performance_schema.events_stages_current order by timer_wait desc; +-----------+----------+--------------+--------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ | THREAD_ID | EVENT_ID | END_EVENT_ID | EVENT_NAME | SOURCE | TIMER_START | TIMER_END | TIMER_WAIT | NESTING_EVENT_ID | NESTING_EVENT_TYPE | +-----------+----------+--------------+--------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ | 24 | 300 | NULL | stage/sql/Sorting result | sql_select.cc:2958 | 66145140925000 | 66145171236000 | 30311000 | 283 | STATEMENT | +-----------+----------+--------------+--------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> select thread_id, event_name, source, timer_wait, lock_time, digest_text from performance_schema.events_statements_current order by timer_wait desc; +-----------+----------------------+----------------+------------+-----------+-------------+ | thread_id | event_name | source | timer_wait | lock_time | digest_text | +-----------+----------------------+----------------+------------+-----------+-------------+ | 24 | statement/sql/select | mysqld.cc:1171 | 4434712000 | 276000000 | NULL | +-----------+----------------------+----------------+------------+-----------+-------------+ 1 row in set (0.00 sec) MariaDB [(none)]> select thread_id, event_name, source, timer_wait from performance_schema.events_waits_current order by timer_wait desc; +-----------+--------------------------------------------------------+--------------------+------------+ | thread_id | event_name | source | timer_wait | +-----------+--------------------------------------------------------+--------------------+------------+ | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:252 | 163800 | +-----------+--------------------------------------------------------+--------------------+------------+ 1 row in set (0.00 sec) MariaDB [(none)]> select * from performance_schema.events_stages_history order by timer_wait desc; +-----------+----------+--------------+--------------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ | THREAD_ID | EVENT_ID | END_EVENT_ID | EVENT_NAME | SOURCE | TIMER_START | TIMER_END | TIMER_WAIT | NESTING_EVENT_ID | NESTING_EVENT_TYPE | +-----------+----------+--------------+--------------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ | 24 | 371 | 375 | stage/sql/Opening tables | sql_base.cc:4501 | 66183474708000 | 66183574441000 | 99733000 | 367 | STATEMENT | | 24 | 379 | 379 | stage/sql/init | sql_select.cc:3322 | 66183584708000 | 66183596930000 | 12222000 | 367 | STATEMENT | | 24 | 382 | 382 | stage/sql/preparing | sql_select.cc:1382 | 66183609152000 | 66183617463000 | 8311000 | 367 | STATEMENT | | 24 | 381 | 381 | stage/sql/statistics | sql_select.cc:1357 | 66183601330000 | 66183609152000 | 7822000 | 367 | STATEMENT | | 24 | 380 | 380 | stage/sql/optimizing | sql_select.cc:1077 | 66183596930000 | 66183601330000 | 4400000 | 367 | STATEMENT | | 24 | 370 | 370 | stage/sql/checking permissions | sql_parse.cc:5998 | 66183470797000 | 66183474708000 | 3911000 | 367 | STATEMENT | | 24 | 383 | 383 | stage/sql/executing | sql_select.cc:2442 | 66183617463000 | 66183619419000 | 1956000 | 367 | STATEMENT | | 24 | 378 | 378 | stage/sql/Table lock | lock.cc:315 | 66183579819000 | 66183581286000 | 1467000 | 367 | STATEMENT | | 24 | 376 | 376 | stage/sql/After opening tables | sql_base.cc:4739 | 66183574441000 | 66183575908000 | 1467000 | 367 | STATEMENT | | 24 | 377 | 377 | stage/sql/System lock | lock.cc:310 | 66183578841000 | 66183579819000 | 978000 | 367 | STATEMENT | +-----------+----------+--------------+--------------------------------+--------------------+----------------+----------------+------------+------------------+--------------------+ 10 rows in set (0.00 sec) MariaDB [(none)]> select thread_id, event_name, source, timer_wait, lock_time, digest_text from performance_schema.events_statements_history order by timer_wait desc; +-----------+----------------------+----------------+------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | thread_id | event_name | source | timer_wait | lock_time | digest_text | +-----------+----------------------+----------------+------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 24 | statement/sql/select | mysqld.cc:1171 | 4538357000 | 276000000 | SELECT `thread_id` , `event_name` , SOURCE , `timer_wait` , `lock_time` , `digest_text` FROM `performance_schema` . `events_statements_current` ORDER BY `timer_wait` DESC | | 24 | statement/sql/select | mysqld.cc:1171 | 2563733000 | 492000000 | SELECT `object_type` , `object_schema` , `object_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `table_lock_waits_summary_by_table` ORDER BY `sum_timer_wait` DESC LIMIT ? | | 24 | statement/sql/select | mysqld.cc:1171 | 2228356000 | 272000000 | SELECT `object_type` , `object_schema` , `object_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `table_io_waits_summary_by_table` ORDER BY `sum_timer_wait` DESC LIMIT ? | | 24 | statement/sql/select | mysqld.cc:1171 | 1808400000 | 147000000 | SELECT `object_type` , `object_schema` , `object_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `objects_summary_global_by_type` ORDER BY `sum_timer_wait` DESC LIMIT ? | | 24 | statement/sql/select | mysqld.cc:1171 | 935733000 | 182000000 | SELECT `event_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `file_summary_by_event_name` ORDER BY `sum_timer_wait` DESC LIMIT ? | | 24 | statement/sql/select | mysqld.cc:1171 | 754845000 | 196000000 | SELECT `file_name` , `event_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `file_summary_by_instance` ORDER BY `sum_timer_wait` DESC LIMIT ? | | 24 | statement/sql/select | mysqld.cc:1171 | 317289000 | 152000000 | SELECT * FROM `performance_schema` . `events_stages_current` ORDER BY `timer_wait` DESC | | 24 | statement/sql/select | mysqld.cc:1171 | 312889000 | 144000000 | SELECT * FROM `performance_schema` . `events_stages_history` ORDER BY `timer_wait` DESC | | 24 | statement/sql/select | mysqld.cc:1171 | 308489000 | 171000000 | SELECT `thread_id` , `event_name` , SOURCE , `timer_wait` FROM `performance_schema` . `events_waits_current` ORDER BY `timer_wait` DESC | | 24 | statement/sql/select | mysqld.cc:1171 | 302133000 | 190000000 | SELECT `event_name` , `count_star` , `sum_timer_wait` FROM `performance_schema` . `socket_summary_by_event_name` ORDER BY `sum_timer_wait` DESC LIMIT ? | +-----------+----------------------+----------------+------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 10 rows in set (0.00 sec) MariaDB [(none)]> select thread_id, event_name, source, timer_wait from performance_schema.events_waits_history order by timer_wait desc; +-----------+--------------------------------------------------------+--------------------+-------------+ | thread_id | event_name | source | timer_wait | +-----------+--------------------------------------------------------+--------------------+-------------+ | 24 | idle | mysqld.cc:1143 | 11392000000 | | 24 | wait/io/file/sql/query_log | mf_iocache.c:1636 | 8302632 | | 24 | wait/synch/rwlock/sql/MDL_lock::rwlock | mdl.cc:1625 | 333528 | | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:340 | 287040 | | 24 | wait/synch/rwlock/sql/MDL_lock::rwlock | mdl.cc:752 | 269880 | | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:648 | 247104 | | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:648 | 230568 | | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:252 | 129168 | | 24 | wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share | table_cache.cc:252 | 99840 | +-----------+--------------------------------------------------------+--------------------+-------------+ 9 rows in set (0.00 sec)