课程名称:课程版本(101/201/301)+ TiDB 的系统表
学习时长:15分钟
课程收获: 了解 TiDB 系统表
课程内容:
TiDB4.0 默认schema
1、information_schema
session_variables
provides information about session variables, replace SHOW SESSION VARIABLES statement
tidb_indexes
provides the Index information of all tables
tidb_hot_regions
provides the hot region information in current TIKV instance
tikv_region_peers
provides the peer information of all Regions
tikv_region_status
provides the status information of all Regions
tikv_store_status
provides the status information of all TiKV
slow_query
provides the slow query information of the current node, which is the parsing result of the TiDB slow log file
cluster_slow_query
provides the slow query information of all nodes in cluster.
The INSTANCE column represents the TiDB node address of the row information on the slow query.
cluster_processlist
is the cluster system table corresponding to PROCESSLIST.
It is used to query the PROCESSLIST information of all TIDB nodes in the cluster.
The table schema of CLUSTER_PROCESSLIST has one more column than PROCESSLIST,the INSTANCE column,which store the address of the TiDB node that row of data is from
TiDB4.0引入的SQL诊断系统表,有如下优势:
It integrates information from all components of the system as a whole
将系统所有组件作为一个整体展示
it provides a consistent interface to the upper layer through system tables.
对上层提供一致性接口
it provides monitoring summaries and automatic diagnosis
U will find it easier to query cluster information
如下是系统诊断相关表:
Cluster information tables:
cluster_info
集群拓扑表,含当前集群拓扑信息、每个实例版本信息及其对应的Git Hash 版本信息、每个实例启动时间以及已经运行了多长时间
cluster_config
记录集群全局各个组件(TiDB、PD、TiKV)的配置信息
cluster_hardware
记录集群各个实例(TiDB、PD、TiKV)的硬件信息
cluster_load
记录集群各个实例(TiDB、PD、TiKV)的负载信息
cluster_systeminfo
集群所有实例的系统内核配置信息
cluster_log
集群日志信息表,目前只提TiKV、TiDB、PD日志信息
Cluster monitoring tables:
metric_tables
metrics_schema 库所有监控表信息都来自information_schema.metric_tables
metric_summary
metric_summary_by_label
汇总所有监控表信息
Automatic diagnosis:
inspection_result
展示系统的诊断结果
inspection_summary
汇总指定link 或 模块 的监控信息
2、metrics_schema
3、performance_schema
4、mysql
Grant system tables 权限系统表
user
user accounts,global privileges,and other non-privileges columns
db
database-level privileges
tables_priv
table_level privileges
columns_priv
column-level privileges
Statistics system tables统计系统表
stats_buckets
the buckets of statistic
stats_histograms
the histograms of statistic
stats_meta
the meta information of tables,such as the total number of rows and updated rows
GC worker system tables
gc_delete_range
to record the data to be deleted
Miscellaneous system tables
GLOBAL_VARIABLES
the global system variable table
tidb
to record the version information when TIDB executes bootstrap
Server-side help system tables
help_topic 目前还是NULL
5、test