最近对数据库很感兴趣,开始学习MySQL,偶然发现优快云有技能树,看了一下还真的蛮不错。有讲解,有答题,最重要的还有实战环境,真的是很赞啊!
MySQL的技能树在这里:https://edu.youkuaiyun.com/skill/mysql
我看了一下除了MySQL还有好多其他可以学习的内容,目测有十四种的样子。
今天过节,上线居然还觉得有些拥挤,刚才就看到一个502,但是拥挤归拥挤,好不容易我有时间写代码,有脸过节了,绝不能因为这点小问题放弃哈。
今天准备利用实战环节,探索一下官方给提供的实战数据库的情况,观察为主。
观察官方提供MySQL数据库
欢迎界面
看到这个欢迎界面,有没有很熟悉的感觉,我的第一感觉就是,这是整合了腾讯云的资源吧,色调一模一样啊,不错。第二感觉就是,这是用的MariaDB啊, 纯正的MySQL之父的产品,恩,源于MySQL优于 MySQL,有品位。第三感觉就是菜单要比腾讯云优化,简洁明了。
前面有一年多没怎么用优快云,不知道发生了什么啊,感觉好像有神仙级别的产品经理入驻了。好兆头!
欢迎界面给了很多提示信息,包括登陆、帮助和语法要点。很明显的位置写着:MariaDB的语句是用;或者\g结束的。 不管语句写的对错,都一定要有结束,否则不会得到反馈哈。这里可以看出 “知止而后勇” 这句话实在是很有道理的!
SHOW TIME
最近在看《高性能MySQL》,不错的书,除了厚还没发现有什么缺点,组织很紧凑,看着也不累,有时候觉得和看小说一样有趣。
但毕竟我没有实战经验,看别人说故事还是有点不过瘾。正好,借着优快云提供的实战环境开始练习一下。
前几天也试着看了一下官方的数据库,有几张表,挺好的案例,结合书的内容,我准备开始今天的探索。
如本章的题目所示,我准备从show这个命令开始。
SHOW 库表
show databases
可以看到官方给的环境里有五个数据库,我们现在在studio这个库里面。我记得安装mysql的时候默认会建一个默认mysql的库,而test、information_schema,performance_schema应该也是系统默认的库。
我们下一步来看看各个库里都有什么表。
show tables
先看看studio这个库里的表。我们用show tables这个命令显示数据库中所有的表。
一共17张表,看起来是一个公司的数据库,我们看到了employee、customer和goods这些表。今天我不准备深入到这些表里。
MariaDB [studio]> show tables;
+------------------+
| Tables_in_studio |
+------------------+
| bids |
| book |
| company |
| customer |
| employee |
| goods |
| goods_category |
| invitation |
| items |
| node |
| orders |
| orders_log |
| payment |
| points |
| stock |
| t8 |
| v_addresses |
+------------------+
17 rows in set (0.000 sec)
然后我们在看一下mysql这个库,从下面的结果来看,有31张表。在show tables之前,我们用use mysql切换了使用中的数据库,use语句好像不用结束符也可以哦,我猜应该是因为use本身不是sql语句。
31张表明显是系统数据,很多统计数据stats,还有权限数据priv,还有很多日志数据log,还有很多其他方面的数据,恩,挺有意思,我们稍后再回头看。
MariaDB [studio]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| column_stats |
| columns_priv |
| db |
| event |
| func |
| general_log |
| gtid_slave_pos |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| index_stats |
| innodb_index_stats |
| innodb_table_stats |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| roles_mapping |
| servers |
| slow_log |
| table_stats |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| transaction_registry |
| user |
+---------------------------+
31 rows in set (0.001 sec)
再来看information_schema这个库,78张表,好多表啊!有意思的事情是,除了use variables之外,其他的表名都是全大写哦。感觉上这个库和配置很有关系,先不细看,一会儿回来。
MariaDB [information_schema]> show tables;
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| ALL_PLUGINS |
| APPLICABLE_ROLES |
| CHARACTER_SETS |
| CHECK_CONSTRAINTS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENABLED_ROLES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEYWORDS |
| KEY_CACHES |
| KEY_COLUMN_USAGE |
| PARAMETERS |
| PARTITIONS |
| PLUGINS |
| PROCESSLIST |
| PROFILING |
| REFERENTIAL_CONSTRAINTS |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| SESSION_VARIABLES |
| STATISTICS |
| SQL_FUNCTIONS |
| SYSTEM_VARIABLES |
| TABLES |
| TABLESPACES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
| GEOMETRY_COLUMNS |
| SPATIAL_REF_SYS |
| CLIENT_STATISTICS |
| INDEX_STATISTICS |
| INNODB_SYS_DATAFILES |
| USER_STATISTICS |
| INNODB_SYS_TABLESTATS |
| INNODB_LOCKS |
| INNODB_MUTEXES |
| INNODB_CMPMEM |
| INNODB_CMP_PER_INDEX |
| INNODB_CMP |
| INNODB_FT_DELETED |
| INNODB_CMP_RESET |
| INNODB_LOCK_WAITS |
| TABLE_STATISTICS |
| INNODB_TABLESPACES_ENCRYPTION |
| INNODB_BUFFER_PAGE_LRU |
| INNODB_SYS_FIELDS |
| INNODB_CMPMEM_RESET |
| INNODB_SYS_COLUMNS |
| INNODB_FT_INDEX_TABLE |
| INNODB_CMP_PER_INDEX_RESET |
| user_variables |
| INNODB_FT_INDEX_CACHE |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_FT_BEING_DELETED |
| INNODB_BUFFER_POOL_STATS |
| INNODB_TRX |
| INNODB_SYS_FOREIGN |
| INNODB_SYS_TABLES |
| INNODB_FT_DEFAULT_STOPWORD |
| INNODB_FT_CONFIG |
| INNODB_BUFFER_PAGE |
| INNODB_SYS_TABLESPACES |
| INNODB_METRICS |
| INNODB_SYS_INDEXES |
| INNODB_SYS_VIRTUAL |
| INNODB_TABLESPACES_SCRUBBING |
| INNODB_SYS_SEMAPHORE_WAITS |
+---------------------------------------+
78 rows in set (0.000 sec)
再看看performance schema这个库,性能方面的记录大概都在这里吧,52张表。这个库的表名都是全小写哦。
MariaDB [studio]> use performance_schema;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [performance_schema]> show tables;
+----------------------------------------------------+
| Tables_in_performance_schema |
+----------------------------------------------------+
| accounts |
| cond_instances |
| events_stages_current |
| events_stages_history |
| events_stages_history_long |
| events_stages_summary_by_account_by_event_name |
| events_stages_summary_by_host_by_event_name |
| events_stages_summary_by_thread_by_event_name |
| events_stages_summary_by_user_by_event_name |
| events_stages_summary_global_by_event_name |
| events_statements_current |
| events_statements_history |
| events_statements_history_long |
| events_statements_summary_by_account_by_event_name |
| events_statements_summary_by_digest |
| events_statements_summary_by_host_by_event_name |
| events_statements_summary_by_thread_by_event_name |
| events_statements_summary_by_user_by_event_name |
| events_statements_summary_global_by_event_name |
| events_waits_current |
| events_waits_history |
| events_waits_history_long |
| events_waits_summary_by_account_by_event_name |
| events_waits_summary_by_host_by_event_name |
| events_waits_summary_by_instance |
| events_waits_summary_by_thread_by_event_name |
| events_waits_summary_by_user_by_event_name |
| events_waits_summary_global_by_event_name |
| file_instances |
| file_summary_by_event_name |
| file_summary_by_instance |
| host_cache |
| hosts |
| mutex_instances |
| objects_summary_global_by_type |
| performance_timers |
| rwlock_instances |
| session_account_connect_attrs |
| session_connect_attrs |
| setup_actors |
| setup_consumers |
| setup_instruments |
| setup_objects |
| setup_timers |
| socket_instances |
| socket_summary_by_event_name |
| socket_summary_by_instance |
| table_io_waits_summary_by_index_usage |
| table_io_waits_summary_by_table |
| table_lock_waits_summary_by_table |
| threads |
| users |
+----------------------------------------------------+
52 rows in set (0.001 sec)
最后来看看test库,哎哟,系统默认是空的哦。
MariaDB [studio]> use test;
Database changed
MariaDB [test]> show tables;
Empty set (0.000 sec)
SHOW CREATE
看书的过程了解到,MySQL可以展示数据表的创建语句,那么我们来看看吧。
MariaDB [studio]> show create table goods;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| goods | CREATE TABLE `goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) DEFAULT NULL,
`category` varchar(64) DEFAULT NULL,
`name` varchar(256) DEFAULT NULL,
`price` decimal(12,4) DEFAULT NULL,
`stock-id` int(11) DEFAULT NULL,
`upper_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)
我们用show create 这个命令来看table goods的创建语句,恩,很清晰。可以看到这张表的主键是id,自增整数,其他列默认空值。这张表使用了InnoDB存储引擎,这也是MySQL的默认存储引擎。默认的字符集是utf8, 但是再表后面的AUTO_INCREMENT = 7是什么意思呢?我有点蒙了,我们稍后再查吧。
SHOW STATUS
既然使用了innodb作为存储引擎,那么就看看innodb的状态吧
使用SHOW engine innodb STATUS,得到了非常详细的输出报告。总体来说,系统很闲:)
| InnoDB | |
=====================================
2022-10-24 08:20:13 0x7f8bc0457700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 37 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 5107 srv_idle
srv_master_thread log flush and writes: 5107
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 11
OS WAIT ARRAY INFO: signal count 9
RW-shared spins 3, rounds 64, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 21.33 RW-shared, 0.00 RW-excl, 0.00 RW-sx
------------
TRANSACTIONS
------------
Trx id counter 253
Purge done for trx's n:o < 235 undo n:o < 0 state: running but idle
History list length 13
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421713513177192, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
345 OS file reads, 135 OS file writes, 4 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 1831964
Log flushed up to 1831964
Pages flushed up to 1831964
Last checkpoint at 1831955
0 pending log flushes, 0 pending chkp writes
11 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 170590208
Dictionary memory allocated 73920
Buffer pool size 8192
Free buffers 7750
Database pages 442
Old database pages 0
Modified db pages 0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 311, created 131, written 131
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 442, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=43, Main thread ID=140237770573568, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
那么看看global status有哪些吧,533行,也就是说有533个全局变量。
MariaDB [studio]> show global status;
+--------------------------------------------------------------+--------------------------------------------------+
| Variable_name | Value |
+--------------------------------------------------------------+--------------------------------------------------+
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Access_denied_errors | 0 |
| Acl_column_grants | 0 |
| Acl_database_grants | 2 |
| Acl_function_grants | 0 |
| Acl_procedure_grants | 0 |
| Acl_package_spec_grants | 0 |
| Acl_package_body_grants | 0 |
| Acl_proxy_users | 2 |
| Acl_role_grants | 0 |
| Acl_roles | 0 |
| Acl_table_grants | 0 |
| Acl_users | 7 |
| Aria_pagecache_blocks_not_flushed | 0 |
| Aria_pagecache_blocks_unused | 15706 |
| Aria_pagecache_blocks_used | 0 |
| Aria_pagecache_read_requests | 0 |
| Aria_pagecache_reads | 0 |
| Aria_pagecache_write_requests | 0 |
| Aria_pagecache_writes | 0 |
| Aria_transaction_log_syncs | 0 |
| Binlog_commits | 0 |
| Binlog_group_commits | 0 |
| Binlog_group_commit_trigger_count | 0 |
| Binlog_group_commit_trigger_lock_wait | 0 |
| Binlog_group_commit_trigger_timeout | 0 |
| Binlog_snapshot_file | |
| Binlog_snapshot_position | 0 |
| Binlog_bytes_written | 0 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Binlog_stmt_cache_disk_use | 0 |
| Binlog_stmt_cache_use | 0 |
| Busy_time | 0.000000 |
| Bytes_received | 9778 |
| Bytes_sent | 264853 |
| Column_compressions | 0 |
| Column_decompressions | 0 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_db_upgrade | 0 |
| Com_alter_event | 0 |
| Com_alter_function | 0 |
| Com_alter_procedure | 0 |
| Com_alter_server | 0 |
| Com_alter_sequence | 0 |
| Com_alter_table | 0 |
| Com_alter_tablespace | 0 |
| Com_alter_user | 0 |
| Com_analyze | 0 |
| Com_assign_to_keycache | 0 |
| Com_begin | 0 |
| Com_binlog | 0 |
| Com_call_procedure | 0 |
| Com_change_db | 4 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_compound_sql | 0 |
| Com_create_db | 0 |
| Com_create_event | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_package | 0 |
| Com_create_package_body | 0 |
| Com_create_procedure | 0 |
| Com_create_role | 0 |
| Com_create_sequence | 0 |
| Com_create_server | 0 |
| Com_create_table | 0 |
| Com_create_temporary_table | 0 |
| Com_create_trigger | 0 |
| Com_create_udf | 0 |
| Com_create_user | 0 |
| Com_create_view | 0 |
| Com_dealloc_sql | 0 |
| Com_delete | 0 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_event | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_procedure | 0 |
| Com_drop_package | 0 |
| Com_drop_package_body | 0 |
| Com_drop_role | 0 |
| Com_drop_server | 0 |
| Com_drop_sequence | 0 |
| Com_drop_table | 0 |
| Com_drop_temporary_table | 0 |
| Com_drop_trigger | 0 |
| Com_drop_user | 0 |
| Com_drop_view | 0 |
| Com_empty_query | 0 |
| Com_execute_immediate | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_get_diagnostics | 0 |
| Com_grant | 0 |
| Com_grant_role | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 0 |
| Com_insert_select | 0 |
| Com_install_plugin | 0 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_lock_tables | 0 |
| Com_multi | 0 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_release_savepoint | 0 |
| Com_rename_table | 0 |
| Com_rename_user | 0 |
| Com_repair | 0 |
| Com_replace | 0 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_resignal | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_revoke_role | 0 |
| Com_rollback | 0 |
| Com_rollback_to_savepoint | 0 |
| Com_savepoint | 0 |
| Com_select | 12 |
| Com_set_option | 0 |
| Com_show_authors | 0 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_contributors | 0 |
| Com_show_create_db | 0 |
| Com_show_create_event | 0 |
| Com_show_create_func | 0 |
| Com_show_create_package | 0 |
| Com_show_create_package_body | 0 |
| Com_show_create_proc | 0 |
| Com_show_create_table | 1 |
| Com_show_create_trigger | 0 |
| Com_show_create_user | 0 |
| Com_show_databases | 18 |
| Com_show_engine_logs | 0 |
| Com_show_engine_mutex | 0 |
| Com_show_engine_status | 1 |
| Com_show_errors | 0 |
| Com_show_events | 0 |
| Com_show_explain | 0 |
| Com_show_fields | 297 |
| Com_show_function_status | 0 |
| Com_show_generic | 0 |
| Com_show_grants | 0 |
| Com_show_keys | 0 |
| Com_show_master_status | 0 |
| Com_show_open_tables | 0 |
| Com_show_package_status | 0 |
| Com_show_package_body_status | 0 |
| Com_show_plugins | 0 |
| Com_show_privileges | 0 |
| Com_show_procedure_status | 0 |
| Com_show_processlist | 0 |
| Com_show_profile | 0 |
| Com_show_profiles | 0 |
| Com_show_relaylog_events | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_storage_engines | 0 |
| Com_show_table_status | 0 |
| Com_show_tables | 20 |
| Com_show_triggers | 0 |
| Com_show_variables | 0 |
| Com_show_warnings | 0 |
| Com_shutdown | 0 |
| Com_signal | 0 |
| Com_start_all_slaves | 0 |
| Com_start_slave | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reprepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_stop_all_slaves | 0 |
| Com_stop_slave | 0 |
| Com_truncate | 0 |
| Com_uninstall_plugin | 0 |
| Com_unlock_tables | 0 |
| Com_update | 0 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connection_errors_accept | 0 |
| Connection_errors_internal | 0 |
| Connection_errors_max_connections | 0 |
| Connection_errors_peer_address | 0 |
| Connection_errors_select | 0 |
| Connection_errors_tcpwrap | 0 |
| Connections | 23 |
| Cpu_time | 0.000000 |
| Created_tmp_disk_tables | 12 |
| Created_tmp_files | 5 |
| Created_tmp_tables | 125 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delete_scan | 0 |
| Empty_queries | 2 |
| Executed_events | 0 |
| Executed_triggers | 0 |
| Feature_check_constraint | 0 |
| Feature_custom_aggregate_functions | 0 |
| Feature_delay_key_write | 0 |
| Feature_dynamic_columns | 0 |
| Feature_fulltext | 0 |
| Feature_gis | 1 |
| Feature_invisible_columns | 0 |
| Feature_json | 0 |
| Feature_locale | 0 |
| Feature_subquery | 0 |
| Feature_system_versioning | 0 |
| Feature_timezone | 0 |
| Feature_trigger | 1 |
| Feature_window_functions | 0 |
| Feature_xml | 0 |
| Flush_commands | 1 |
| Handler_commit | 1 |
| Handler_delete | 0 |
| Handler_discover | 52 |
| Handler_external_lock | 0 |
| Handler_icp_attempts | 0 |
| Handler_icp_match | 0 |
| Handler_mrr_init | 0 |
| Handler_mrr_key_refills | 0 |
| Handler_mrr_rowid_refills | 0 |
| Handler_prepare | 0 |
| Handler_read_first | 3 |
| Handler_read_key | 0 |
| Handler_read_last | 0 |
| Handler_read_next | 0 |
| Handler_read_prev | 0 |
| Handler_read_retry | 0 |
| Handler_read_rnd | 0 |
| Handler_read_rnd_deleted | 0 |
| Handler_read_rnd_next | 736 |
| Handler_rollback | 0 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_tmp_delete | 0 |
| Handler_tmp_update | 0 |
| Handler_tmp_write | 679 |
| Handler_update | 0 |
| Handler_write | 0 |
| Innodb_buffer_pool_dump_status | |
| Innodb_buffer_pool_load_status | Buffer pool(s) load completed at 221024 6:55:06 |
| Innodb_buffer_pool_resize_status | |
| Innodb_buffer_pool_load_incomplete | OFF |
| Innodb_buffer_pool_pages_data | 442 |
| Innodb_buffer_pool_bytes_data | 7241728 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_bytes_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 131 |
| Innodb_buffer_pool_pages_free | 7750 |
| Innodb_buffer_pool_pages_misc | 0 |
| Innodb_buffer_pool_pages_total | 8192 |
| Innodb_buffer_pool_read_ahead_rnd | 0 |
| Innodb_buffer_pool_read_ahead | 0 |
| Innodb_buffer_pool_read_ahead_evicted | 0 |
| Innodb_buffer_pool_read_requests | 2049 |
| Innodb_buffer_pool_reads | 312 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 843 |
| Innodb_data_fsyncs | 4 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 5245440 |
| Innodb_data_reads | 345 |
| Innodb_data_writes | 135 |
| Innodb_data_written | 2148864 |
| Innodb_dblwr_pages_written | 0 |
| Innodb_dblwr_writes | 0 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 1 |
| Innodb_log_writes | 2 |
| Innodb_os_log_fsyncs | 4 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 1536 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 131 |
| Innodb_pages_read | 311 |
| Innodb_pages0_read | 22 |
| Innodb_pages_written | 131 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 0 |
| Innodb_rows_updated | 0 |
| Innodb_system_rows_deleted | 0 |
| Innodb_system_rows_inserted | 0 |
| Innodb_system_rows_read | 0 |
| Innodb_system_rows_updated | 0 |
| Innodb_num_open_files | 25 |
| Innodb_truncated_status_writes | 0 |
| Innodb_available_undo_logs | 128 |
| Innodb_undo_truncations | 0 |
| Innodb_page_compression_saved | 0 |
| Innodb_num_pages_page_compressed | 0 |
| Innodb_num_page_compressed_trim_op | 0 |
| Innodb_num_pages_page_decompressed | 0 |
| Innodb_num_pages_page_compression_error | 0 |
| Innodb_num_pages_encrypted | 0 |
| Innodb_num_pages_decrypted | 0 |
| Innodb_have_lz4 | OFF |
| Innodb_have_lzo | OFF |
| Innodb_have_lzma | ON |
| Innodb_have_bzip2 | OFF |
| Innodb_have_snappy | OFF |
| Innodb_have_punch_hole | ON |
| Innodb_defragment_compression_failures | 0 |
| Innodb_defragment_failures | 0 |
| Innodb_defragment_count | 0 |
| Innodb_instant_alter_column | 0 |
| Innodb_onlineddl_rowlog_rows | 0 |
| Innodb_onlineddl_rowlog_pct_used | 0 |
| Innodb_onlineddl_pct_progress | 0 |
| Innodb_secondary_index_triggered_cluster_reads | 0 |
| Innodb_secondary_index_triggered_cluster_reads_avoided | 0 |
| Innodb_encryption_rotation_pages_read_from_cache | 0 |
| Innodb_encryption_rotation_pages_read_from_disk | 0 |
| Innodb_encryption_rotation_pages_modified | 0 |
| Innodb_encryption_rotation_pages_flushed | 0 |
| Innodb_encryption_rotation_estimated_iops | 0 |
| Innodb_encryption_n_merge_blocks_encrypted | 0 |
| Innodb_encryption_n_merge_blocks_decrypted | 0 |
| Innodb_encryption_n_rowlog_blocks_encrypted | 0 |
| Innodb_encryption_n_rowlog_blocks_decrypted | 0 |
| Innodb_encryption_n_temp_blocks_encrypted | 0 |
| Innodb_encryption_n_temp_blocks_decrypted | 0 |
| Innodb_scrub_background_page_reorganizations | 0 |
| Innodb_scrub_background_page_splits | 0 |
| Innodb_scrub_background_page_split_failures_underflow | 0 |
| Innodb_scrub_background_page_split_failures_out_of_filespace | 0 |
| Innodb_scrub_background_page_split_failures_missing_index | 0 |
| Innodb_scrub_background_page_split_failures_unknown | 0 |
| Innodb_scrub_log | 0 |
| Innodb_encryption_num_key_requests | 0 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 107163 |
| Key_blocks_used | 2 |
| Key_blocks_warm | 0 |
| Key_read_requests | 2 |
| Key_reads | 2 |
| Key_write_requests | 0 |
| Key_writes | 0 |
| Last_query_cost | 0.000000 |
| Master_gtid_wait_count | 0 |
| Master_gtid_wait_time | 0 |
| Master_gtid_wait_timeouts | 0 |
| Max_statement_time_exceeded | 0 |
| Max_used_connections | 2 |
| Memory_used | 276837296 |
| Memory_used_initial | 274096048 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 59 |
| Open_streams | 0 |
| Open_table_definitions | 100 |
| Open_tables | 99 |
| Opened_files | 197 |
| Opened_plugin_libraries | 0 |
| Opened_table_definitions | 101 |
| Opened_tables | 107 |
| Opened_views | 8 |
| Performance_schema_accounts_lost | 0 |
| Performance_schema_cond_classes_lost | 0 |
| Performance_schema_cond_instances_lost | 0 |
| Performance_schema_digest_lost | 0 |
| Performance_schema_file_classes_lost | 0 |
| Performance_schema_file_handles_lost | 0 |
| Performance_schema_file_instances_lost | 0 |
| Performance_schema_hosts_lost | 0 |
| Performance_schema_locker_lost | 0 |
| Performance_schema_mutex_classes_lost | 0 |
| Performance_schema_mutex_instances_lost | 0 |
| Performance_schema_rwlock_classes_lost | 0 |
| Performance_schema_rwlock_instances_lost | 0 |
| Performance_schema_session_connect_attrs_lost | 0 |
| Performance_schema_socket_classes_lost | 0 |
| Performance_schema_socket_instances_lost | 0 |
| Performance_schema_stage_classes_lost | 0 |
| Performance_schema_statement_classes_lost | 0 |
| Performance_schema_table_handles_lost | 0 |
| Performance_schema_table_instances_lost | 0 |
| Performance_schema_thread_classes_lost | 0 |
| Performance_schema_thread_instances_lost | 0 |
| Performance_schema_users_lost | 0 |
| Prepared_stmt_count | 0 |
| Qcache_free_blocks | 1 |
| Qcache_free_memory | 1031320 |
| Qcache_hits | 0 |
| Qcache_inserts | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 0 |
| Qcache_queries_in_cache | 0 |
| Qcache_total_blocks | 1 |
| Queries | 369 |
| Questions | 369 |
| Rows_read | 11 |
| Rows_sent | 689 |
| Rows_tmp_read | 677 |
| Rpl_semi_sync_master_clients | 0 |
| Rpl_semi_sync_master_get_ack | 0 |
| Rpl_semi_sync_master_net_avg_wait_time | 0 |
| Rpl_semi_sync_master_net_wait_time | 0 |
| Rpl_semi_sync_master_net_waits | 0 |
| Rpl_semi_sync_master_no_times | 0 |
| Rpl_semi_sync_master_no_tx | 0 |
| Rpl_semi_sync_master_request_ack | 0 |
| Rpl_semi_sync_master_status | OFF |
| Rpl_semi_sync_master_timefunc_failures | 0 |
| Rpl_semi_sync_master_tx_avg_wait_time | 0 |
| Rpl_semi_sync_master_tx_wait_time | 0 |
| Rpl_semi_sync_master_tx_waits | 0 |
| Rpl_semi_sync_master_wait_pos_backtraverse | 0 |
| Rpl_semi_sync_master_wait_sessions | 0 |
| Rpl_semi_sync_master_yes_tx | 0 |
| Rpl_semi_sync_slave_send_ack | 0 |
| Rpl_semi_sync_slave_status | OFF |
| Rpl_status | AUTH_MASTER |
| Rpl_transactions_multi_engine | 0 |
| Select_full_join | 0 |
| Select_full_range_join | 0 |
| Select_range | 0 |
| Select_range_check | 0 |
| Select_scan | 39 |
| Slave_connections | 0 |
| Slave_heartbeat_period | 0.000 |
| Slave_open_temp_tables | 0 |
| Slave_received_heartbeats | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slave_skipped_errors | 0 |
| Slaves_connected | 0 |
| Slaves_running | 0 |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_priority_queue_sorts | 0 |
| Sort_range | 0 |
| Sort_rows | 0 |
| Sort_scan | 0 |
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_server_not_after | |
| Ssl_server_not_before | |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
| Subquery_cache_hit | 0 |
| Subquery_cache_miss | 0 |
| Syncs | 4 |
| Table_locks_immediate | 18 |
| Table_locks_waited | 0 |
| Table_open_cache_active_instances | 1 |
| Table_open_cache_hits | 141 |
| Table_open_cache_misses | 115 |
| Table_open_cache_overflows | 0 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 4096 |
| Tc_log_page_waits | 0 |
| Threadpool_idle_threads | 0 |
| Threadpool_threads | 0 |
| Threads_cached | 0 |
| Threads_connected | 2 |
| Threads_created | 6 |
| Threads_running | 6 |
| Transactions_gtid_foreign_engine | 0 |
| Transactions_multi_engine | 0 |
| Update_scan | 0 |
| Uptime | 5575 |
| Uptime_since_flush_status | 5575 |
| wsrep_applier_thread_count | 0 |
| wsrep_cluster_conf_id | 18446744073709551615 |
| wsrep_cluster_size | 0 |
| wsrep_cluster_state_uuid | |
| wsrep_cluster_status | Disconnected |
| wsrep_connected | OFF |
| wsrep_local_bf_aborts | 0 |
| wsrep_local_index | 18446744073709551615 |
| wsrep_provider_name | |
| wsrep_provider_vendor | |
| wsrep_provider_version | |
| wsrep_ready | OFF |
| wsrep_rollbacker_thread_count | 0 |
| wsrep_thread_count | 0 |
+--------------------------------------------------------------+--------------------------------------------------+
533 rows in set (0.003 sec)
好的,有了一些观察基础,明天我们继续探索。