巡 检 人:小麦苗([QQ:646634621] [微信公众号:DB宝] [提供OCP、OCM、高可用、MySQL和PostgreSQL最实用的培训]) 巡检时间:2022-04-08 11:19:32 版 本 号:v7.0.0 修改日期:2022-4-8 18:28:00
[转到页底]
● 数据库基本信息
now_date | user | CURRENT_USER1 | CONNECTION_ID | db_name | Server_version | all_db_size_MB | all_datafile_size_MB | datadir | SOCKET | log_error | autocommit | log_bin | server_id |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-04-08 11:19:38 | root@192.168.66.64 | root@% | 15 | 8.0.25-15 | 7.61 | 86.00 | /data/GreatSQL/ | /data/GreatSQL/mysql.sock | /data/GreatSQL/error.log | 1 | 1 | 3306 |
● 版本信息
● 插件信息
PLUGIN_NAME | PLUGIN_VERSION | PLUGIN_STATUS | PLUGIN_TYPE | PLUGIN_TYPE_VERSION | PLUGIN_LIBRARY | PLUGIN_LIBRARY_VERSION | PLUGIN_AUTHOR | PLUGIN_DESCRIPTION | PLUGIN_LICENSE | LOAD_OPTION |
---|---|---|---|---|---|---|---|---|---|---|
binlog | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | This is a pseudo storage engine to represent the binlog in a transaction | GPL | FORCE | ||
mysql_native_password | 1.1 | ACTIVE | AUTHENTICATION | 2.0 | Oracle Corporation | Native MySQL authentication | GPL | FORCE | ||
sha256_password | 1.1 | ACTIVE | AUTHENTICATION | 2.0 | Oracle Corporation | SHA256 password authentication | GPL | FORCE | ||
caching_sha2_password | 1.0 | ACTIVE | AUTHENTICATION | 2.0 | Oracle Corporation | Caching sha2 authentication | GPL | FORCE | ||
sha2_cache_cleaner | 1.0 | ACTIVE | AUDIT | 4.1 | Oracle Corporation | Cache cleaner for Caching sha2 authentication | GPL | FORCE | ||
daemon_keyring_proxy_plugin | 1.0 | ACTIVE | DAEMON | 80025.0 | Oracle | A plugin that implements the keyring component services atop of the keyring plugin | GPL | FORCE | ||
PERFORMANCE_SCHEMA | 0.1 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | Performance Schema | GPL | FORCE | ||
CSV | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | CSV storage engine | GPL | FORCE | ||
MEMORY | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | Hash based, stored in memory, useful for temporary tables | GPL | FORCE | ||
InnoDB | 8.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | GPL | FORCE | ||
INNODB_TRX | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB transactions | GPL | FORCE | ||
INNODB_CMP | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compression | GPL | FORCE | ||
INNODB_CMP_RESET | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compression; reset cumulated counts | GPL | FORCE | ||
INNODB_CMPMEM | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compressed buffer pool | GPL | FORCE | ||
INNODB_CMPMEM_RESET | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compressed buffer pool; reset cumulated counts | GPL | FORCE | ||
INNODB_CMP_PER_INDEX | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compression (per index) | GPL | FORCE | ||
INNODB_CMP_PER_INDEX_RESET | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Statistics for the InnoDB compression (per index); reset cumulated counts | GPL | FORCE | ||
INNODB_BUFFER_PAGE | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Buffer Page Information | GPL | FORCE | ||
INNODB_BUFFER_PAGE_LRU | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Buffer Page in LRU | GPL | FORCE | ||
INNODB_BUFFER_POOL_STATS | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Buffer Pool Statistics Information | GPL | FORCE | ||
INNODB_TEMP_TABLE_INFO | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Temp Table Stats | GPL | FORCE | ||
INNODB_METRICS | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Metrics Info | GPL | FORCE | ||
INNODB_FT_DEFAULT_STOPWORD | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | Default stopword list for InnDB Full Text Search | GPL | FORCE | ||
INNODB_FT_DELETED | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | INNODB AUXILIARY FTS DELETED TABLE | GPL | FORCE | ||
INNODB_FT_BEING_DELETED | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | INNODB AUXILIARY FTS BEING DELETED TABLE | GPL | FORCE | ||
INNODB_FT_CONFIG | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | INNODB AUXILIARY FTS CONFIG TABLE | GPL | FORCE | ||
INNODB_FT_INDEX_CACHE | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | INNODB AUXILIARY FTS INDEX CACHED | GPL | FORCE | ||
INNODB_FT_INDEX_TABLE | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | INNODB AUXILIARY FTS INDEX TABLE | GPL | FORCE | ||
INNODB_TABLES | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_TABLES | GPL | FORCE | ||
INNODB_TABLESTATS | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_TABLESTATS | GPL | FORCE | ||
INNODB_INDEXES | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_INDEXES | GPL | FORCE | ||
INNODB_TABLESPACES | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_TABLESPACES | GPL | FORCE | ||
INNODB_COLUMNS | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_COLUMNS | GPL | FORCE | ||
INNODB_VIRTUAL | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB INNODB_VIRTUAL | GPL | FORCE | ||
INNODB_CACHED_INDEXES | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB cached indexes | GPL | FORCE | ||
INNODB_SESSION_TEMP_TABLESPACES | 8.0 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Oracle Corporation | InnoDB Session Temporary tablespaces | GPL | FORCE | ||
INNODB_TABLESPACES_ENCRYPTION | 8.2 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Google Inc | InnoDB TABLESPACES_ENCRYPTION | BSD | FORCE | ||
INNODB_TABLESPACES_SCRUBBING | 8.0 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Google Inc | InnoDB TABLESPACES_SCRUBBING | BSD | FORCE | ||
INNODB_CHANGED_PAGES | 1.0 | ACTIVE | INFORMATION SCHEMA | 80025.0 | Percona | InnoDB CHANGED_PAGES table | GPL | FORCE | ||
MyISAM | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | MyISAM storage engine | GPL | FORCE | ||
MRG_MYISAM | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | Collection of identical MyISAM tables | GPL | FORCE | ||
TempTable | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | InnoDB temporary storage engine | GPL | FORCE | ||
ARCHIVE | 3.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | Archive storage engine | GPL | ON | ||
BLACKHOLE | 1.0 | ACTIVE | STORAGE ENGINE | 80025.0 | Oracle Corporation | /dev/null storage engine (anything you write to it disappears) | GPL | ON | ||
FEDERATED | 1.0 | DISABLED | STORAGE ENGINE | 80025.0 | Oracle Corporation | Federated MySQL storage engine | GPL | OFF | ||
ngram | 0.1 | ACTIVE | FTPARSER | 1.1 | Oracle Corporation | Ngram Full-Text Parser | GPL | ON | ||
mysqlx_cache_cleaner | 1.0 | ACTIVE | AUDIT | 4.1 | Oracle Corporation | Cache cleaner for sha2 authentication in X plugin | GPL | ON | ||
mysqlx | 1.0 | ACTIVE | DAEMON | 80025.0 | Oracle Corporation | X Plugin for MySQL | GPL | ON | ||
clone | 1.0 | ACTIVE | CLONE | 1.0 | mysql_clone.so | 1.10 | Oracle Corporation | CLONE PLUGIN | GPL | ON |
group_replication | 1.1 | ACTIVE | GROUP REPLICATION | 1.4 | group_replication.so | 1.10 | Oracle Corporation | Group Replication (1.1.0) | GPL | ON |
● 当前数据库实例的所有数据库及其容量大小
SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | table_rows | data_size_mb | index_size_mb | all_size_mb | max_size_mb | free_size_mb | disk_size_mb |
---|---|---|---|---|---|---|---|---|---|
mysql | utf8mb4 | utf8mb4_0900_ai_ci | 138550 | 7.43 | 0.31 | 7.75 | 0.00 | 132.00 | |
sys | utf8mb4 | utf8mb4_0900_ai_ci | 6 | 0.01 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 |
information_schema | utf8 | utf8_general_ci | 0 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | |
performance_schema | utf8mb4 | utf8mb4_0900_ai_ci | 2964672 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
● 数据库对象
db_name | ob_type | sums |
---|---|---|
mysql | TABLE | 35 |
performance_schema | TABLE | 114 |
sys | TABLE | 1 |
sys | TRIGGERS | 2 |
sys | PROCEDURE | 26 |
sys | FUNCTION | 22 |
sys | VIEWS | 100 |
● 查看数据库的运行状态
-------------- mysql Ver 14.14 Distrib 5.7.30, for Win64 (x86_64) Connection id: 15 Current database: Current user: root@192.168.66.64 SSL: Cipher in use is ECDHE-RSA-AES128-GCM-SHA256 Using delimiter: ; Server version: 8.0.25-15 GreatSQL, Release 15, Revision c7feae175e0 Protocol version: 10 Connection: 192.168.66.35 via TCP/IP Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: gbk Conn. characterset: gbk TCP port: 3306 Uptime: 26 min 15 sec Threads: 2 Questions: 3801 Slow queries: 9 Opens: 1736 Flush tables: 3 Open tables: 297 Queries per second avg: 2.413 -------------- |
● 占用空间最大的前10张大表
db_name | table_name | TABLE_TYPE | ENGINE | CREATE_TIME | UPDATE_TIME | TABLE_COLLATION | table_rows | tb_size_mb | index_size_mb | all_size_mb | free_size_mb | disk_size_mb |
---|---|---|---|---|---|---|---|---|---|---|---|---|
mysql | time_zone_transition | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 120838 | 4.51 | 0.00 | 4.51 | 4.00 | ||
mysql | help_topic | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 462 | 1.51 | 0.09 | 1.60 | 4.00 | ||
mysql | time_zone_transition_type | BASE TABLE | InnoDB | 2022-04-08 10:52:50 | utf8_general_ci | 9777 | 0.42 | 0.00 | 0.42 | 4.00 | ||
mysql | help_keyword | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 1005 | 0.12 | 0.12 | 0.25 | 4.00 | ||
mysql | time_zone_name | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 1864 | 0.23 | 0.00 | 0.23 | 4.00 | ||
mysql | help_relation | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 2631 | 0.09 | 0.00 | 0.09 | 4.00 | ||
mysql | time_zone | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 1812 | 0.07 | 0.00 | 0.07 | 4.00 | ||
mysql | global_grants | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_bin | 70 | 0.06 | 0.00 | 0.06 | 4.00 | ||
mysql | tables_priv | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_bin | 2 | 0.01 | 0.01 | 0.03 | 4.00 | ||
mysql | help_category | BASE TABLE | InnoDB | 2022-04-08 10:52:49 | utf8_general_ci | 53 | 0.01 | 0.01 | 0.03 | 4.00 |
● 占用空间最大的前10个索引
database_name | table_name | index_name | SizeMB | NON_UNIQUE | INDEX_TYPE | COLUMN_NAME |
---|
● 所有存储引擎列表
ENGINE | SUPPORT | COMMENT | TRANSACTIONS | XA | SAVEPOINTS |
---|---|---|---|---|---|
FEDERATED | NO | Federated MySQL storage engine | |||
PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
MyISAM | YES | MyISAM storage engine | NO | NO | NO |
MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
CSV | YES | CSV storage engine | NO | NO | NO |
ARCHIVE | YES | Archive storage engine | NO | NO | NO |
● 存储引擎和DB的数量关系
ENGINE | counts |
---|---|
191 | |
InnoDB | 34 |
CSV | 2 |
PERFORMANCE_SCHEMA | 114 |
TABLE_SCHEMA | ENGINE | counts |
---|---|---|
information_schema | 91 | |
mysql | CSV | 2 |
mysql | InnoDB | 33 |
performance_schema | PERFORMANCE_SCHEMA | 114 |
sys | 100 | |
sys | InnoDB | 1 |
● InnoDB 系统表空间
FILE_ID | FILE_NAME | FILE_TYPE | TABLESPACE_NAME | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | ENGINE | FULLTEXT_KEYS | DELETED_ROWS | UPDATE_COUNT | FREE_EXTENTS | TOTAL_EXTENTS | EXTENT_SIZE | INITIAL_SIZE | MAXIMUM_SIZE | AUTOEXTEND_SIZE | CREATION_TIME | LAST_UPDATE_TIME | LAST_ACCESS_TIME | RECOVER_TIME | TRANSACTION_COUNTER | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | CREATE_TIME | UPDATE_TIME | CHECK_TIME | CHECKSUM | STATUS | EXTRA |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | ./ibdata1 | TABLESPACE | innodb_system | InnoDB | 2 | 12 | 1048576 | 12582912 | 67108864 | 6291456 | NORMAL | ||||||||||||||||||||||||||
4294967293 | ./ibtmp1 | TEMPORARY | innodb_temporary | InnoDB | 2 | 12 | 1048576 | 12582912 | 67108864 | 6291456 | NORMAL | ||||||||||||||||||||||||||
4294967279 | ./undo_001 | UNDO LOG | innodb_undo_001 | InnoDB | 4 | 16 | 1048576 | 16777216 | 16777216 | 8388608 | NORMAL | ||||||||||||||||||||||||||
4294967278 | ./undo_002 | UNDO LOG | innodb_undo_002 | InnoDB | 0 | 16 | 1048576 | 16777216 | 16777216 | 8388608 | NORMAL |
● 查询所有用户
Host | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
% | repl | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N | N | N | N | N | N | N | N | N | 0 | 0 | 0 | 0 | mysql_native_password | ||||
% | root | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | 0 | 0 | 0 | 0 | caching_sha2_password | ||||
localhost | mysql.infoschema | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | 0 | 0 | 0 | 0 | caching_sha2_password | ||||
localhost | mysql.session | N | N | N | N | N | N | N | Y | N | N | N | N | N | N | N | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | 0 | 0 | 0 | 0 | caching_sha2_password | ||||
localhost | mysql.sys | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | 0 | 0 | 0 | 0 | caching_sha2_password | ||||
localhost | root | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | 0 | 0 | 0 | 0 | caching_sha2_password | ||||
● 查询MySQL支持的所有字符集
CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
---|---|---|---|
big5 | big5_chinese_ci | Big5 Traditional Chinese | 2 |
dec8 | dec8_swedish_ci | DEC West European | 1 |
cp850 | cp850_general_ci | DOS West European | 1 |
hp8 | hp8_english_ci | HP West European | 1 |
koi8r | koi8r_general_ci | KOI8-R Relcom Russian | 1 |
latin1 | latin1_swedish_ci | cp1252 West European | 1 |
latin2 | latin2_general_ci | ISO 8859-2 Central European | 1 |
swe7 | swe7_swedish_ci | 7bit Swedish | 1 |
ascii | ascii_general_ci | US ASCII | 1 |
ujis | ujis_japanese_ci | EUC-JP Japanese | 3 |
sjis | sjis_japanese_ci | Shift-JIS Japanese | 2 |
hebrew | hebrew_general_ci | ISO 8859-8 Hebrew | 1 |
tis620 | tis620_thai_ci | TIS620 Thai | 1 |
euckr | euckr_korean_ci | EUC-KR Korean | 2 |
koi8u | koi8u_general_ci | KOI8-U Ukrainian | 1 |
gb2312 | gb2312_chinese_ci | GB2312 Simplified Chinese | 2 |
greek | greek_general_ci | ISO 8859-7 Greek | 1 |
cp1250 | cp1250_general_ci | Windows Central European | 1 |
gbk | gbk_chinese_ci | GBK Simplified Chinese | 2 |
latin5 | latin5_turkish_ci | ISO 8859-9 Turkish | 1 |
armscii8 | armscii8_general_ci | ARMSCII-8 Armenian | 1 |
utf8 | utf8_general_ci | UTF-8 Unicode | 3 |
ucs2 | ucs2_general_ci | UCS-2 Unicode | 2 |
cp866 | cp866_general_ci | DOS Russian | 1 |
keybcs2 | keybcs2_general_ci | DOS Kamenicky Czech-Slovak | 1 |
macce | macce_general_ci | Mac Central European | 1 |
macroman | macroman_general_ci | Mac West European | 1 |
cp852 | cp852_general_ci | DOS Central European | 1 |
latin7 | latin7_general_ci | ISO 8859-13 Baltic | 1 |
cp1251 | cp1251_general_ci | Windows Cyrillic | 1 |
utf16 | utf16_general_ci | UTF-16 Unicode | 4 |
utf16le | utf16le_general_ci | UTF-16LE Unicode | 4 |
cp1256 | cp1256_general_ci | Windows Arabic | 1 |
cp1257 | cp1257_general_ci | Windows Baltic | 1 |
utf32 | utf32_general_ci | UTF-32 Unicode | 4 |
binary | binary | Binary pseudo charset | 1 |
geostd8 | geostd8_general_ci | GEOSTD8 Georgian | 1 |
cp932 | cp932_japanese_ci | SJIS for Windows Japanese | 2 |
eucjpms | eucjpms_japanese_ci | UJIS for Windows Japanese | 3 |
gb18030 | gb18030_chinese_ci | China National Standard GB18030 | 4 |
utf8mb4 | utf8mb4_0900_ai_ci | UTF-8 Unicode | 4 |
● 查看当前连接到数据库的用户和Host
USER | HOST |
---|---|
event_scheduler | localhost |
root | 192.168.66.64:7401 |
● 查看每个host的当前连接数和总连接数
HOST | CURRENT_CONNECTIONS | TOTAL_CONNECTIONS |
---|---|---|
1 | 7 | |
localhost | 1 | 1 |
192.168.66.64 | 1 | 8 |
● 按照登录用户+登录服务器查看登录信息
login_user | login_ip | login_count |
---|---|---|
event_scheduler | 1 | |
root | 192.168.66.64 | 1 |
● 按照登录用户+数据库+登录服务器查看登录信息
database_name | login_user | login_ip | login_count |
---|---|---|---|
event_scheduler | 1 | ||
root | 192.168.66.64 | 1 |
● 查询所有线程(排除sleep线程)
ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
---|---|---|---|---|---|---|---|
5 | event_scheduler | localhost | Daemon | 1576 | Waiting on empty queue |
THREAD_ID | NAME | TYPE | PROCESSLIST_ID | PROCESSLIST_USER | PROCESSLIST_HOST | PROCESSLIST_DB | PROCESSLIST_COMMAND | PROCESSLIST_TIME | PROCESSLIST_STATE | PROCESSLIST_INFO | PARENT_THREAD_ID | ROLE | INSTRUMENTED | HISTORY | CONNECTION_TYPE | THREAD_OS_ID |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43 | thread/sql/event_scheduler | FOREGROUND | 5 | event_scheduler | localhost | Daemon | 1576 | Waiting on empty queue | 1 | YES | YES | 168 | ||||
47 | thread/sql/compress_gtid_table | FOREGROUND | 7 | Daemon | 1576 | Suspending | 1 | YES | YES | 172 |
● sleep线程TOP20
ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
---|
THREAD_ID | NAME | TYPE | PROCESSLIST_ID | PROCESSLIST_USER | PROCESSLIST_HOST | PROCESSLIST_DB | PROCESSLIST_COMMAND | PROCESSLIST_TIME | PROCESSLIST_STATE | PROCESSLIST_INFO | PARENT_THREAD_ID | ROLE | INSTRUMENTED | HISTORY | CONNECTION_TYPE | THREAD_OS_ID |
---|
● 查询InnoDB存储引擎的运行时信息,包括死锁的详细信息
● 当前Innodb内核中的当前活跃(active)事务
trx_id | trx_state | trx_started | trx_requested_lock_id | trx_wait_started | trx_weight | trx_mysql_thread_id | trx_query | trx_operation_state | trx_tables_in_use | trx_tables_locked | trx_lock_structs | trx_lock_memory_bytes | trx_rows_locked | trx_rows_modified | trx_concurrency_tickets | trx_isolation_level | trx_unique_checks | trx_foreign_key_checks | trx_last_foreign_key_error | trx_adaptive_hash_latched | trx_adaptive_hash_timeout | trx_is_read_only | trx_autocommit_non_locking |
---|
● 元数据锁的相关信息
NAME | ENABLED | TIMED |
---|---|---|
wait/lock/metadata/sql/mdl | YES | YES |
locked_schema | locked_table | locked_type | waiting_processlist_id | waiting_age | waiting_query | waiting_state | blocking_processlist_id | blocking_age | blocking_query | sql_kill_blocking_connection |
---|
locked_schema | locked_table | locked_type | waiting_processlist_id | waiting_age | waiting_query | waiting_state | blocking_processlist_id | blocking_age | blocking_query | sql_kill_blocking_connection |
---|
thd_id | conn_id | user | db | command | state | time | current_statement | statement_latency | progress | lock_latency | rows_examined | rows_sent | rows_affected | tmp_tables | tmp_disk_tables | full_scan | last_statement | last_statement_latency | current_memory | last_wait | last_wait_latency | source | trx_latency | trx_state | trx_autocommit | pid | program_name | lock_summary |
---|
object_schema | object_name | waiting_thread_id | waiting_pid | waiting_account | waiting_lock_type | waiting_lock_duration | waiting_query | waiting_query_secs | waiting_query_rows_affected | waiting_query_rows_examined | blocking_thread_id | blocking_pid | blocking_account | blocking_lock_type | blocking_lock_duration | sql_kill_blocking_query | sql_kill_blocking_connection |
---|
● 查看服务器的状态
● 跟踪长时间操作的进度
THREAD_ID | EVENT_ID | END_EVENT_ID | EVENT_NAME | SOURCE | TIMER_START | TIMER_END | TIMER_WAIT | WORK_COMPLETED | WORK_ESTIMATED | NESTING_EVENT_ID | NESTING_EVENT_TYPE |
---|
● 查看平均执行时间值大于95%的平均执行时间的语句(可近似地认为是平均执行时间超长的语句),默认情况下按照语句平均延迟(执行时间)降序排序
query | db | full_scan | exec_count | err_count | warn_count | total_latency | max_latency | avg_latency | rows_sent | rows_sent_avg | rows_examined | rows_examined_avg | first_seen | last_seen | digest |
---|
● 查看当前正在执行的语句进度信息
thd_id | conn_id | user | db | command | state | time | current_statement | statement_latency | progress | lock_latency | rows_examined | rows_sent | rows_affected | tmp_tables | tmp_disk_tables | full_scan | last_statement | last_statement_latency | current_memory | last_wait | last_wait_latency | source | trx_latency | trx_state | trx_autocommit | pid | program_name |
---|
● 查看已经执行完的语句相关统计信息
thd_id | conn_id | user | db | command | state | time | current_statement | statement_latency | progress | lock_latency | rows_examined | rows_sent | rows_affected | tmp_tables | tmp_disk_tables | full_scan | last_statement | last_statement_latency | current_memory | last_wait | last_wait_latency | source | trx_latency | trx_state | trx_autocommit | pid | program_name |
---|
● 查看使用了临时表的语句,默认情况下按照磁盘临时表数量和内存临时表数量进行降序排序
query | db | exec_count | total_latency | memory_tmp_tables | disk_tmp_tables | avg_tmp_tables_per_query | tmp_tables_to_disk_pct | first_seen | last_seen | digest |
---|---|---|---|---|---|---|---|---|---|---|
SELECT ? UNION ALL SELECT `con ... MIT ? ) `V` UNION ALL SELECT ? | 4 | 3.84 ms | 12 | 4 | 3 | 33 | 2022-04-08 10:57:10.819758 | 2022-04-08 11:19:41.677440 | c2f0920e26e84d609a0962ab9bacb45804aece48f45228010822c564b710f943 | |
SELECT ? UNION ALL SELECT `con ... - ? ) ) `V` UNION ALL SELECT ? | 4 | 3.89 ms | 12 | 4 | 3 | 33 | 2022-04-08 10:57:11.112107 | 2022-04-08 11:19:41.971445 | 87f263403e4a1aaf439a3b73f3c2c2498b4f3e85181498e2fe88f97aed7959b7 | |
SELECT ? UNION ALL SELECT `con ... MIT ? ) `V` UNION ALL SELECT ? | 4 | 4.03 ms | 8 | 4 | 2 | 50 | 2022-04-08 10:57:11.846188 | 2022-04-08 11:19:42.702883 | a71f560a8e0c260d57080c81c9f5c83e3d60ad725a4a01fdd8102f8eed32282f | |
SELECT ? UNION ALL SELECT `con ... GINS` ) `V` UNION ALL SELECT ? | 4 | 6.53 ms | 4 | 4 | 1 | 100 | 2022-04-08 10:57:08.546113 | 2022-04-08 11:19:38.880159 | c9c8560645bced1d0f2c0bd7c0874c6d451581ce3425b2efcc1b431c21536866 | |
SELECT ? UNION ALL SELECT `con ... ` ( ) ) `V` UNION ALL SELECT ? | 4 | 3.45 ms | 4 | 4 | 1 | 100 | 2022-04-08 10:57:11.603436 | 2022-04-08 11:19:42.460369 | 2541f6d4972434db06768a3a92e024b72f7e52b7dbf1aa0320177313069e9828 | |
SELECT ? UNION ALL SELECT `con ... ` = ? ) `V` UNION ALL SELECT ? | 3 | 3.27 ms | 3 | 3 | 1 | 100 | 2022-04-08 10:57:16.816440 | 2022-04-08 11:18:55.998557 | 937193685b21f68dfcd74005d63e109e89dbf18d899fd6899436b9ceafd712d7 | |
SELECT ? UNION ALL SELECT `con ... - ? ) ) `V` UNION ALL SELECT ? | 2 | 1.89 ms | 6 | 2 | 3 | 33 | 2022-04-08 11:18:50.684498 | 2022-04-08 11:19:42.119288 | 28a8cf0aee2963d7ef833895a67d515329bf3204c7c6df73a052b70d50a4ea23 | |
SELECT ? UNION ALL SELECT `con ... - ? ) ) `V` UNION ALL SELECT ? | 2 | 1.9 ms | 6 | 2 | 3 | 33 | 2022-04-08 10:57:11.260678 | 2022-04-08 11:09:11.444207 | 642b5ecf0eb82817a42cd32434ff07466bb8b88e805580fdcb19bd831055a930 | |
SELECT `concat` ( ? , `ifnull` ... TION ( ? IN HOST ) - ? ) ) `V` | 1 | 1.44 ms | 3 | 1 | 3 | 33 | 2022-04-08 11:15:23.145158 | 2022-04-08 11:15:23.145158 | 9912d114bdb0db0b052a3880bd0067e9f89d0d56745713eab94b4a96aaa2ef33 | |
SELECT `concat` ( ? , `databas ... TION ( ? IN HOST ) - ? ) ) `V` | 1 | 1.76 ms | 3 | 1 | 3 | 33 | 2022-04-08 11:10:49.306695 | 2022-04-08 11:10:49.306695 | 9cfd71d42688c678067b03076dfef242e3b218d6a0d88142e7e15e89c75ad57f |
● 有临时表的前10条SQL语句
query | db | full_scan | exec_count | err_count | warn_count | total_latency | max_latency | avg_latency | lock_latency | rows_sent | rows_sent_avg | rows_examined | rows_examined_avg | rows_affected | rows_affected_avg | tmp_tables | tmp_disk_tables | rows_sorted | sort_merge_passes | digest | first_seen | last_seen |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SELECT `internal_tablespace_id ... _ROWS` , ? AS `UPDATE_COUNT` , | * | 16 | 0 | 0 | 1.90 s | 1.58 s | 118.62 ms | 33.09 ms | 108 | 7 | 2556 | 160 | 0 | 0 | 28 | 0 | 80 | 0 | 56ebc6e21608c16d20579b17eca3668ef7bae51b1c1cdd8a0622ae1c146006ff | 2022-04-08 10:57:08.246401 | 2022-04-08 11:19:40.944840 | |
SELECT COUNT (?) AS `cnt` , `r ... y_by_digest` GROUP BY `avg_us` | * | 4 | 0 | 0 | 57.66 ms | 16.44 ms | 14.42 ms | 6.51 ms | 20 | 5 | 436 | 109 | 0 | 0 | 28 | 0 | 24 | 0 | 92ff97b05a2a2e654025eae1e78fdeafead5be7e942f76f5dcc937737c2f7138 | 2022-04-08 10:57:14.146283 | 2022-04-08 11:19:44.803821 | |
SELECT ( `cat` . `name` COLLAT ... ction_collation_id` ) ) ) JOIN | * | 4 | 0 | 0 | 85.46 ms | 40.09 ms | 21.37 ms | 20.85 ms | 36 | 9 | 36 | 9 | 0 | 0 | 28 | 0 | 0 | 0 | 513931926a5cef8e76cd0f4279226f8e729f2ee6a83827c0b60522b1f566f0ef | 2022-04-08 10:57:08.910704 | 2022-04-08 11:19:39.729505 | |
SELECT `t` . `THREAD_ID` AS `t ... T_NUMBER_OF_BYTES_USED` ) DESC | * | 4 | 0 | 0 | 462.04 ms | 132.60 ms | 115.51 ms | 9.56 ms | 12 | 3 | 20 | 5 | 0 | 0 | 24 | 0 | 401 | 0 | 2a5e41c03bf35093f51e81fb81b13e07005f0c742759ae7a75c10afa4cfe9c9d | 2022-04-08 10:57:13.349374 | 2022-04-08 11:19:44.008150 | |
SELECT ( `cat` . `name` COLLAT ... te_data` , COALESCE ( `stat` . | * | 11 | 0 | 0 | 59.99 ms | 6.91 ms | 5.45 ms | 13.02 ms | 62 | 6 | 62 | 6 | 0 | 0 | 19 | 0 | 24 | 0 | c0d9adc65303cbad4ff4e71fab7bb4f071392ea4456d3d741ce5b09be33c7dbf | 2022-04-08 10:57:09.878336 | 2022-04-08 11:19:40.795331 | |
SELECT `t` . `THREAD_ID` AS `t ... F_BYTES_USED` ) DESC (unknown) | * | 8 | 0 | 0 | 20.84 ms | 3.36 ms | 2.61 ms | 12.25 ms | 16 | 2 | 16 | 2 | 0 | 0 | 16 | 0 | 0 | 0 | 1564cd5c0d3704b0b7f27cfb3ea273ab3261f37040a5d3f51f2471f811db7a13 | 2022-04-08 10:57:14.246423 | 2022-04-08 11:19:45.002062 | |
SELECT ( `cat` . `name` COLLAT ... den` ) ) , COALESCE ( `stat` . | * | 7 | 0 | 0 | 40.26 ms | 9.08 ms | 5.75 ms | 9.47 ms | 146 | 21 | 1786 | 255 | 0 | 0 | 12 | 0 | 0 | 0 | 65ac3bed35307c7b61b3d7f2ea0f6e94a087f4a2c830cd7d4d96182b73852d64 | 2022-04-08 10:57:09.579160 | 2022-04-08 11:19:40.392265 | |
SELECT ? UNION ALL SELECT `con ... DESC ) `V` UNION ALL SELECT ? | * | 3 | 0 | 3 | 2.23 ms | 775.34 us | 744.80 us | 1.17 ms | 6 | 2 | 6 | 2 | 0 | 0 | 12 | 0 | 0 | 0 | 23a299fabdfca3771d2e39118c51cf18d337f0a47e58d576ca55e2b325fe31b9 | 2022-04-08 10:57:14.891786 | 2022-04-08 11:18:54.066369 | |
SELECT ? UNION ALL SELECT `con ... MIT ? ) `V` UNION ALL SELECT ? | * | 4 | 0 | 0 | 3.84 ms | 997.95 us | 961.12 us | 1.81 ms | 16 | 4 | 16 | 4 | 0 | 0 | 12 | 4 | 0 | 0 | c2f0920e26e84d609a0962ab9bacb45804aece48f45228010822c564b710f943 | 2022-04-08 10:57:10.819758 | 2022-04-08 11:19:41.677440 | |
SELECT ? UNION ALL SELECT `con ... - ? ) ) `V` UNION ALL SELECT ? | * | 4 | 0 | 0 | 3.89 ms | 1.02 ms | 971.85 us | 1.85 ms | 16 | 4 | 16 | 4 | 0 | 0 | 12 | 4 | 0 | 0 | 87f263403e4a1aaf439a3b73f3c2c2498b4f3e85181498e2fe88f97aed7959b7 | 2022-04-08 10:57:11.112107 | 2022-04-08 11:19:41.971445 |
● 查看执行了文件排序的语句,默认情况下按照语句总延迟时间(执行时间)降序排序
query | db | exec_count | total_latency | sort_merge_passes | avg_sort_merges | sorts_using_scans | sort_using_range | rows_sorted | avg_rows_sorted | first_seen | last_seen | digest |
---|
● 查询SQL的整体消耗百分比
state | total_r | pct_r | calls | r/call |
---|
● 执行次数Top10
query | db | full_scan | exec_count | err_count | warn_count | total_latency | max_latency | avg_latency | lock_latency | rows_sent | rows_sent_avg | rows_examined | rows_examined_avg | rows_affected | rows_affected_avg | tmp_tables | tmp_disk_tables | rows_sorted | sort_merge_passes | digest | first_seen | last_seen |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SELECT `internal_tablespace_id ... _ROWS` , ? AS `UPDATE_COUNT` , | * | 16 | 0 | 0 | 1.90 s | 1.58 s | 118.62 ms | 33.09 ms | 108 | 7 | 2556 | 160 | 0 | 0 | 28 | 0 | 80 | 0 | 56ebc6e21608c16d20579b17eca3668ef7bae51b1c1cdd8a0622ae1c146006ff | 2022-04-08 10:57:08.246401 | 2022-04-08 11:19:40.944840 | |
SELECT ( `cat` . `name` COLLAT ... te_data` , COALESCE ( `stat` . | * | 11 | 0 | 0 | 59.99 ms | 6.91 ms | 5.45 ms | 13.02 ms | 62 | 6 | 62 | 6 | 0 | 0 | 19 | 0 | 24 | 0 | c0d9adc65303cbad4ff4e71fab7bb4f071392ea4456d3d741ce5b09be33c7dbf | 2022-04-08 10:57:09.878336 | 2022-04-08 11:19:40.795331 | |
SELECT `t` . `THREAD_ID` AS `t ... F_BYTES_USED` ) DESC (unknown) | * | 8 | 0 | 0 | 20.84 ms | 3.36 ms | 2.61 ms | 12.25 ms | 16 | 2 | 16 | 2 | 0 | 0 | 16 | 0 | 0 | 0 | 1564cd5c0d3704b0b7f27cfb3ea273ab3261f37040a5d3f51f2471f811db7a13 | 2022-04-08 10:57:14.246423 | 2022-04-08 11:19:45.002062 | |
SELECT ( `cat` . `name` COLLAT ... den` ) ) , COALESCE ( `stat` . | * | 7 | 0 | 0 | 40.26 ms | 9.08 ms | 5.75 ms | 9.47 ms | 146 | 21 | 1786 | 255 | 0 | 0 | 12 | 0 | 0 | 0 | 65ac3bed35307c7b61b3d7f2ea0f6e94a087f4a2c830cd7d4d96182b73852d64 | 2022-04-08 10:57:09.579160 | 2022-04-08 11:19:40.392265 | |
SELECT `sys` . `format_stateme ... atency` , `format_pico_time` ( | * | 7 | 0 | 0 | 28.45 ms | 4.44 ms | 4.06 ms | 5.09 ms | 84 | 12 | 84 | 12 | 0 | 0 | 7 | 0 | 70 | 0 | 508486bd060b13d75e7374136fec54ea4e8827b60fbb8fac7aded21a9ecf3c8a | 2022-04-08 10:57:14.596631 | 2022-04-08 11:19:45.258692 | |
SHOW GLOBAL VARIABLES WHERE `V ... l_variables` . `VARIABLE_NAME` | * | 7 | 0 | 0 | 26.02 ms | 5.11 ms | 3.72 ms | 2.50 ms | 158 | 23 | 158 | 23 | 0 | 0 | 7 | 0 | 0 | 0 | 3843bbd6565b5be5ced26d3cd6b87c95388208a8bda45858bee0ef931b4dbfb1 | 2022-04-08 10:57:10.623187 | 2022-04-08 11:19:41.482724 | |
SHOW VARIABLES LIKE ? (unknown ... n_variables` . `VARIABLE_NAME` | * | 4 | 0 | 0 | 19.64 ms | 6.16 ms | 4.91 ms | 801.00 us | 20 | 5 | 20 | 5 | 0 | 0 | 4 | 0 | 0 | 0 | a87043a2f1fedffea3d9eb9c3f1ea4066dbb6481c035609112a31b4425b3aac9 | 2022-04-08 10:57:08.398344 | 2022-04-08 11:19:38.727789 | |
SELECT ? UNION ALL SELECT `con ... GINS` ) `V` UNION ALL SELECT ? | * | 4 | 0 | 0 | 6.53 ms | 1.69 ms | 1.63 ms | 2.82 ms | 208 | 52 | 208 | 52 | 0 | 0 | 4 | 4 | 0 | 0 | c9c8560645bced1d0f2c0bd7c0874c6d451581ce3425b2efcc1b431c21536866 | 2022-04-08 10:57:08.546113 | 2022-04-08 11:19:38.880159 | |
SELECT ( `cat` . `name` COLLAT ... ction_collation_id` ) ) ) JOIN | * | 4 | 0 | 0 | 85.46 ms | 40.09 ms | 21.37 ms | 20.85 ms | 36 | 9 | 36 | 9 | 0 | 0 | 28 | 0 | 0 | 0 | 513931926a5cef8e76cd0f4279226f8e729f2ee6a83827c0b60522b1f566f0ef | 2022-04-08 10:57:08.910704 | 2022-04-08 11:19:39.729505 | |
SELECT ? UNION ALL SELECT `con ... INES` ) `V` UNION ALL SELECT ? | * | 4 | 0 | 0 | 2.12 ms | 555.00 us | 529.12 us | 1.05 ms | 44 | 11 | 44 | 11 | 0 | 0 | 4 | 0 | 0 | 0 | d3a5b69de359299423c84c180dc32c5945166dab355a2dce7c2a5028ed74cbde | 2022-04-08 10:57:09.726094 | 2022-04-08 11:19:40.539108 |
● 使用全表扫描的SQL语句
object_schema | object_name | rows_full_scanned | latency |
---|
● 查看全表扫描或者没有使用到最优索引的语句(经过标准化转化的语句文本),默认情况下按照全表扫描次数与语句总次数百分比和语句总延迟时间(执行时间)降序排序
query | db | exec_count | total_latency | no_index_used_count | no_good_index_used_count | no_index_used_pct | rows_sent | rows_examined | rows_sent_avg | rows_examined_avg | first_seen | last_seen | digest |
---|
● 查看产生错误或警告的语句,默认情况下,按照错误数量和警告数量降序排序
query | db | exec_count | errors | error_pct | warnings | warning_pct | first_seen | last_seen | digest |
---|---|---|---|---|---|---|---|---|---|
SELECT ? UNION ALL SELECT `con ... DESC ) `V` UNION ALL SELECT ? | 4 | 0 | 0.0000 | 4 | 100.0000 | 2022-04-08 10:57:14.891786 | 2022-04-08 11:19:45.605355 | 23a299fabdfca3771d2e39118c51cf18d337f0a47e58d576ca55e2b325fe31b9 | |
SHOW SLAVE HOSTS | 3 | 0 | 0.0000 | 3 | 100.0000 | 2022-04-08 10:57:17.253847 | 2022-04-08 11:18:56.437664 | f59f2dee8175a875cdb3093ec4d2e4e82f9198f48fd99b6090cf6f00ebc3321e | |
SHOW SLAVE STATUS | 3 | 0 | 0.0000 | 3 | 100.0000 | 2022-04-08 10:57:17.892558 | 2022-04-08 11:18:57.080809 | aeea8d14c430e6eaaf2ffc1c542f366c21a261cbe130323702b18c3c36cf92ae |
● 无效索引(从未使用过的索引)
object_schema | object_name | index_name |
---|---|---|
performance_schema | cond_instances | NAME |
performance_schema | data_lock_waits | REQUESTING_ENGINE_LOCK_ID |
performance_schema | data_lock_waits | BLOCKING_ENGINE_LOCK_ID |
performance_schema | data_lock_waits | REQUESTING_ENGINE_TRANSACTION_ID |
performance_schema | data_lock_waits | BLOCKING_ENGINE_TRANSACTION_ID |
performance_schema | data_lock_waits | REQUESTING_THREAD_ID |
performance_schema | data_lock_waits | BLOCKING_THREAD_ID |
performance_schema | data_locks | ENGINE_TRANSACTION_ID |
performance_schema | data_locks | THREAD_ID |
performance_schema | data_locks | OBJECT_SCHEMA |
performance_schema | error_log | THREAD_ID |
performance_schema | error_log | PRIO |
performance_schema | error_log | ERROR_CODE |
performance_schema | error_log | SUBSYSTEM |
performance_schema | events_waits_summary_by_instance | EVENT_NAME |
performance_schema | file_instances | EVENT_NAME |
performance_schema | file_summary_by_instance | FILE_NAME |
performance_schema | file_summary_by_instance | EVENT_NAME |
performance_schema | host_cache | HOST |
performance_schema | metadata_locks | OBJECT_TYPE |
performance_schema | metadata_locks | OWNER_THREAD_ID |
performance_schema | mutex_instances | NAME |
performance_schema | mutex_instances | LOCKED_BY_THREAD_ID |
performance_schema | prepared_statements_instances | STATEMENT_ID |
performance_schema | prepared_statements_instances | STATEMENT_NAME |
performance_schema | prepared_statements_instances | OWNER_OBJECT_TYPE |
performance_schema | replication_applier_status_by_coordinator | THREAD_ID |
performance_schema | replication_applier_status_by_worker | THREAD_ID |
performance_schema | replication_asynchronous_connection_failover | CHANNEL_NAME |
performance_schema | replication_connection_status | THREAD_ID |
performance_schema | rwlock_instances | NAME |
performance_schema | rwlock_instances | WRITE_LOCKED_BY_THREAD_ID |
performance_schema | socket_instances | THREAD_ID |
performance_schema | socket_instances | SOCKET_ID |
performance_schema | socket_instances | IP |
performance_schema | socket_summary_by_instance | EVENT_NAME |
performance_schema | table_handles | OBJECT_TYPE |
performance_schema | table_handles | OWNER_THREAD_ID |
performance_schema | threads | PROCESSLIST_ID |
performance_schema | threads | THREAD_OS_ID |
performance_schema | threads | NAME |
performance_schema | threads | PROCESSLIST_ACCOUNT |
performance_schema | threads | PROCESSLIST_HOST |
performance_schema | threads | RESOURCE_GROUP |
● 每张表的索引区分度(前100条)
区分度越接近1,表示区分度越高;低于0.1,则说明区分度较差,开发者应该重新评估SQL语句涉及的字段,选择区分度高的多个字段创建索引
ASdb | AStable | ASindex_name | AScols | ASdefferRows | ASROWS | sel_persent |
---|
● 主从库线程
THREAD_ID | NAME | TYPE | PROCESSLIST_ID | PROCESSLIST_USER | PROCESSLIST_HOST | PROCESSLIST_DB | PROCESSLIST_COMMAND | PROCESSLIST_TIME | PROCESSLIST_STATE | PROCESSLIST_INFO | PARENT_THREAD_ID | ROLE | INSTRUMENTED | HISTORY | CONNECTION_TYPE | THREAD_OS_ID |
---|
ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
---|
● 二进制日志
binlog.000001 179 No binlog.000002 156 No |
● MGR详情
CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
---|
● 从库状态监测(需要在从库执行才有数据)
CHANNEL_NAME | HOST | PORT | USER | CONNECTION_RETRY_COUNT | CONNECTION_RETRY_INTERVAL | SOURCE_UUID | THREAD_ID | SERVICE_STATE | COUNT_RECEIVED_HEARTBEATS | LAST_HEARTBEAT_TIMESTAMP | LAST_ERROR_NUMBER | LAST_ERROR_MESSAGE | LAST_ERROR_TIMESTAMP |
---|
● 克隆进度和状态
ID | PID | STATE | BEGIN_TIME | END_TIME | SOURCE | DESTINATION | ERROR_NO | ERROR_MESSAGE | BINLOG_FILE | BINLOG_POSITION | GTID_EXECUTED |
---|
stage | state | START TIME | FINISH TIME | DURATION | Estimate | Done(%) |
---|
● 性能参数统计
● setup_consumers
NAME | ENABLED |
---|---|
events_stages_current | NO |
events_stages_history | NO |
events_stages_history_long | NO |
events_statements_current | YES |
events_statements_history | YES |
events_statements_history_long | NO |
events_transactions_current | YES |
events_transactions_history | YES |
events_transactions_history_long | NO |
events_waits_current | NO |
events_waits_history | NO |
events_waits_history_long | NO |
global_instrumentation | YES |
thread_instrumentation | YES |
statements_digest | YES |
● 自增ID的使用情况(前20条)
table_schema | table_name | engine | Auto_increment |
---|
● 无主键或唯一键的表(前100条)
table_schema | table_name |
---|