Sign InTry Free

CLUSTER_CONFIG

You can use the CLUSTER_CONFIG cluster configuration table to get the current configuration of all server components in the cluster. This simplifies the usage over earlier releases of TiDB, where obtaining similar information would require accessing the HTTP API end points of each instance.

USE information_schema; DESC cluster_config;
+----------+--------------+------+------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+------+---------+-------+ | TYPE | varchar(64) | YES | | NULL | | | INSTANCE | varchar(64) | YES | | NULL | | | KEY | varchar(256) | YES | | NULL | | | VALUE | varchar(128) | YES | | NULL | | +----------+--------------+------+------+---------+-------+

Field description:

  • TYPE: The instance type. The optional values are tidb, pd, and tikv.
  • INSTANCE: The service address of the instance.
  • KEY: The configuration item name.
  • VALUE: The configuration item value.

The following example shows how to query the coprocessor configuration on the TiKV instance using the CLUSTER_CONFIG table:

SELECT * FROM cluster_config WHERE type='tikv' AND `key` LIKE 'coprocessor%';
+------+-----------------+-----------------------------------+---------+ | TYPE | INSTANCE | KEY | VALUE | +------+-----------------+-----------------------------------+---------+ | tikv | 127.0.0.1:20165 | coprocessor.batch-split-limit | 10 | | tikv | 127.0.0.1:20165 | coprocessor.region-max-keys | 1440000 | | tikv | 127.0.0.1:20165 | coprocessor.region-max-size | 144MiB | | tikv | 127.0.0.1:20165 | coprocessor.region-split-keys | 960000 | | tikv | 127.0.0.1:20165 | coprocessor.region-split-size | 96MiB | | tikv | 127.0.0.1:20165 | coprocessor.split-region-on-table | false | +------+-----------------+-----------------------------------+---------+ 6 rows in set (0.00 sec)

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.