Sign InTry Free

Information Schema

Information Schema provides an ANSI-standard way of viewing system metadata. TiDB also provides a number of custom INFORMATION_SCHEMA tables, in addition to the tables included for MySQL compatibility.

Many INFORMATION_SCHEMA tables have a corresponding SHOW command. The benefit of querying INFORMATION_SCHEMA is that it is possible to join between tables.

Tables for MySQL compatibility

Table NameDescription
CHARACTER_SETSProvides a list of character sets the server supports.
COLLATIONSProvides a list of collations that the server supports.
COLLATION_CHARACTER_SET_APPLICABILITYExplains which collations apply to which character sets.
COLUMNSProvides a list of columns for all tables.
COLUMN_PRIVILEGESNot implemented by TiDB. Returns zero rows.
COLUMN_STATISTICSNot implemented by TiDB. Returns zero rows.
ENGINESProvides a list of supported storage engines.
EVENTSNot implemented by TiDB. Returns zero rows.
FILESNot implemented by TiDB. Returns zero rows.
GLOBAL_STATUSNot implemented by TiDB. Returns zero rows.
GLOBAL_VARIABLESNot implemented by TiDB. Returns zero rows.
KEY_COLUMN_USAGEDescribes the key constraints of the columns, such as the primary key constraint.
OPTIMIZER_TRACENot implemented by TiDB. Returns zero rows.
PARAMETERSNot implemented by TiDB. Returns zero rows.
PARTITIONSProvides a list of table partitions.
PLUGINSNot implemented by TiDB. Returns zero rows.
PROCESSLISTProvides similar information to the command SHOW PROCESSLIST.
PROFILINGNot implemented by TiDB. Returns zero rows.
REFERENTIAL_CONSTRAINTSProvides information on FOREIGN KEY constraints.
ROUTINESNot implemented by TiDB. Returns zero rows.
SCHEMATAProvides similar information to SHOW DATABASES.
SCHEMA_PRIVILEGESNot implemented by TiDB. Returns zero rows.
SESSION_STATUSNot implemented by TiDB. Returns zero rows.
SESSION_VARIABLESProvides similar functionality to the command SHOW SESSION VARIABLES
STATISTICSProvides information on table indexes.
TABLESProvides a list of tables that the current user has visibility of. Similar to SHOW TABLES.
TABLESPACESNot implemented by TiDB. Returns zero rows.
TABLE_CONSTRAINTSProvides information on primary keys, unique indexes and foreign keys.
TABLE_PRIVILEGESNot implemented by TiDB. Returns zero rows.
TRIGGERSNot implemented by TiDB. Returns zero rows.
USER_PRIVILEGESSummarizes the privileges associated with the current user.
VIEWSProvides a list of views that the current user has visibility of. Similar to running SHOW FULL TABLES WHERE table_type = 'VIEW'

Tables that are TiDB extensions

Table NameDescription
ANALYZE_STATUSProvides information about tasks to collect statistics.
CLIENT_ERRORS_SUMMARY_BY_HOSTProvides a summary of errors and warnings generated by client requests and returned to clients.
CLIENT_ERRORS_SUMMARY_BY_USERProvides a summary of errors and warnings generated by clients.
CLIENT_ERRORS_SUMMARY_GLOBALProvides a summary of errors and warnings generated by clients.
CLUSTER_CONFIGProvides details about configuration settings for the entire TiDB cluster. This table is not applicable to TiDB Cloud.
CLUSTER_DEADLOCKSProvides a cluster-level view of the DEADLOCKS table.
CLUSTER_HARDWAREProvides details on the underlying physical hardware discovered on each TiDB component. This table is not applicable to TiDB Cloud.
CLUSTER_INFOProvides details on the current cluster topology.
CLUSTER_LOADProvides current load information for TiDB servers in the cluster. This table is not applicable to TiDB Cloud.
CLUSTER_LOGProvides a log for the entire TiDB cluster. This table is not applicable to TiDB Cloud.
CLUSTER_PROCESSLISTProvides a cluster-level view of the PROCESSLIST table.
CLUSTER_SLOW_QUERYProvides a cluster-level view of the SLOW_QUERY table.
CLUSTER_STATEMENTS_SUMMARYProvides a cluster-level view of the STATEMENTS_SUMMARY table.
CLUSTER_STATEMENTS_SUMMARY_HISTORYProvides a cluster-level view of the STATEMENTS_SUMMARY_HISTORY table.
CLUSTER_TIDB_TRXProvides a cluster-level view of the TIDB_TRX table.
CLUSTER_SYSTEMINFOProvides details about kernel parameter configuration for servers in the cluster. This table is not applicable to TiDB Cloud.
DATA_LOCK_WAITSProvides the lock-waiting information on the TiKV server.
DDL_JOBSProvides similar output to ADMIN SHOW DDL JOBS
DEADLOCKSProvides the information of several deadlock errors that have recently occurred.
INSPECTION_RESULTTriggers internal diagnostics checks. This table is not applicable to TiDB Cloud.
INSPECTION_RULESA list of internal diagnostic checks performed. This table is not applicable to TiDB Cloud.
INSPECTION_SUMMARYA summarized report of important monitoring metrics. This table is not applicable to TiDB Cloud.
METRICS_SUMMARYA summary of metrics extracted from Prometheus. This table is not applicable to TiDB Cloud.
METRICS_SUMMARY_BY_LABELSee METRICS_SUMMARY table.
METRICS_TABLESProvides the PromQL definitions for tables in METRICS_SCHEMA. This table is not applicable to TiDB Cloud.
PLACEMENT_RULESProvides information on all objects that have explicit placement rules assigned. This table is not applicable to TiDB Cloud.
SEQUENCESThe TiDB implementation of sequences is based on MariaDB.
SLOW_QUERYProvides information on slow queries on the current TiDB server.
STATEMENTS_SUMMARYSimilar to performance_schema statement summary in MySQL.
STATEMENTS_SUMMARY_HISTORYSimilar to performance_schema statement summary history in MySQL.
TABLE_STORAGE_STATSProvides details about table sizes in storage.
TIDB_HOT_REGIONSProvides statistics about which regions are hot. This table is not applicable to TiDB Cloud.
TIDB_HOT_REGIONS_HISTORYProvides history statistics about which Regions are hot.
TIDB_INDEXESProvides index information about TiDB tables.
TIDB_SERVERS_INFOProvides a list of TiDB servers (namely, tidb-server component)
TIDB_TRXProvides the information of the transactions that are being executed on the TiDB node.
TIFLASH_REPLICAProvides details about TiFlash replicas.
TIKV_REGION_PEERSProvides details about where regions are stored.
TIKV_REGION_STATUSProvides statistics about regions.
TIKV_STORE_STATUSProvides basic information about TiKV servers.

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.