Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.99 KB

check-cluster-status-using-sql-statements.md

File metadata and controls

28 lines (22 loc) · 1.99 KB
title summary aliases
Check the TiDB Cluster Status Using SQL Statements
This document introduces that TiDB offers some SQL statements and system tables to check the TiDB cluster status.
/docs/dev/check-cluster-status-using-sql-statements/
/docs/dev/reference/performance/check-cluster-status-using-sql-statements/

Check the TiDB Cluster Status Using SQL Statements

TiDB offers some SQL statements and system tables to check the TiDB cluster status.

The INFORMATION_SCHEMA system database offers system tables as follows to query the cluster status and diagnose common cluster issues:

You can also use the following statements to obtain some useful information for troubleshooting and querying the TiDB cluster status.

  • ADMIN SHOW DDL: obtains the ID of TiDB with the DDL owner role and IP:PORT.
  • The feature of SHOW ANALYZE STATUS is the same with that of the ANALYZE_STATUS table.
  • Specific EXPLAIN statements
    • EXPLAIN ANALYZE: obtains some detailed information for execution of a SQL statement.
    • EXPLAIN FOR CONNECTION: obtains the execution plan for the query executed last in a connection. Can be used along with SHOW PROCESSLIST.
    • For more information about EXPLAIN, see Understand the Query Execution Plan.