mysql
Schema
The mysql
schema contains TiDB system tables. The design is similar to the mysql
schema in MySQL, where tables such as mysql.user
can be edited directly. It also contains a number of tables which are extensions to MySQL.
Grant system tables
These system tables contain grant information about user accounts and their privileges:
user
: user accounts, global privileges, and other non-privilege columnsdb
: database-level privilegestables_priv
: table-level privilegescolumns_priv
: column-level privilegesdefault_roles
: the default roles for a userglobal_grants
: dynamic privilegesglobal_priv
: the authentication information based on certificatesrole_edges
: the relationship between roles
Server-side help system tables
Currently, the help_topic
is NULL.
Statistics system tables
stats_buckets
: the buckets of statisticsstats_histograms
: the histograms of statisticsstats_top_n
: the TopN of statisticsstats_meta
: the meta information of tables, such as the total number of rows and updated rowsstats_extended
: extended statistics, such as the order correlation between columnsstats_feedback
: the query feedback of statisticsstats_fm_sketch
: the FMSketch distribution of the histogram of the statistics columnanalyze_options
: the defaultanalyze
options for each tablecolumn_stats_usage
: the usage of column statisticsschema_index_usage
: the usage of indexes
Execution plan-related system tables
bind_info
: the binding information of execution planscapture_plan_baselines_blacklist
: the blocklist for the automatic binding of the execution plan
GC worker system tables
gc_delete_range
: the KV range to be deletedgc_delete_range_done
: the deleted KV range
Miscellaneous system tables
GLOBAL_VARIABLES
: global system variable table
tidb
: to record the version information when TiDB executesbootstrap
expr_pushdown_blacklist
: the blocklist for expression pushdownopt_rule_blacklist
: the blocklist for logical optimization rulestable_cache_meta
: the metadata of cached tables