Description: Returns the current cluster version.
Syntax:
showVersionStatement : SHOW VERSION ;
Example:
IoTDB> SHOW VERSION;
Result:
+-------+-----------+ |Version| BuildInfo| +-------+-----------+ |1.3.4.1|e5334cf-dev| +-------+-----------+
Description: Returns key parameters of the current cluster.
Syntax:
showVariablesStatement : SHOW VARIABLES ;
Key Parameters:
Example:
IoTDB> SHOW VARIABLES;
Result:
+----------------------------------+-----------------------------------------------------------------+ | Variable| Value| +----------------------------------+-----------------------------------------------------------------+ | ClusterName| defaultCluster| | DataReplicationFactor| 1| | SchemaReplicationFactor| 1| | DataRegionConsensusProtocolClass| org.apache.iotdb.consensus.iot.IoTConsensus| |SchemaRegionConsensusProtocolClass| org.apache.iotdb.consensus.ratis.RatisConsensus| | ConfigNodeConsensusProtocolClass| org.apache.iotdb.consensus.ratis.RatisConsensus| | TimePartitionOrigin| 0| | TimePartitionInterval| 604800000| | ReadConsistencyLevel| strong| | SchemaRegionPerDataNode| 1| | DataRegionPerDataNode| 0| | SeriesSlotNum| 1000| | SeriesSlotExecutorClass|org.apache.iotdb.commons.partition.executor.hash.BKDRHashExecutor| | DiskSpaceWarningThreshold| 0.05| | TimestampPrecision| ms| +----------------------------------+-----------------------------------------------------------------+
Description: Returns the current timestamp of the database.
Syntax:
showCurrentTimestampStatement : SHOW CURRENT_TIMESTAMP ;
Example:
IoTDB> SHOW CURRENT_TIMESTAMP;
Result:
+-----------------------------+ | CurrentTimestamp| +-----------------------------+ |2025-02-17T11:11:52.987+08:00| +-----------------------------+
Description: Displays information about all currently executing queries.
Syntax:
showQueriesStatement : SHOW (QUERIES | QUERY PROCESSLIST) (WHERE where=booleanExpression)? (ORDER BY sortItem (',' sortItem)*)? limitOffsetClause ;
Parameters:
LIMIT <offset>, <row_count>.Columns in QUERIES Table:
Example:
IoTDB> SHOW QUERIES WHERE elapsedtime > 0.003
Result:
+-----------------------------+-----------------------+----------+-----------+--------------------------------------+ | Time| QueryId|DataNodeId|ElapsedTime| Statement| +-----------------------------+-----------------------+----------+-----------+--------------------------------------+ |2025-05-09T15:16:01.293+08:00|20250509_071601_00015_1| 1| 0.006|SHOW QUERIES WHERE elapsedtime > 0.003| +-----------------------------+-----------------------+----------+-----------+--------------------------------------+
Description: Displays regions' information of the current cluster.
Syntax:
showRegionsStatement : SHOW REGIONS ;
Example:
IoTDB> SHOW REGIONS
Result:
+--------+------------+-------+-------------+-------------+-----------+----------+----------+-------+---------------+------+-----------------------+----------+ |RegionId| Type| Status| Database|SeriesSlotNum|TimeSlotNum|DataNodeId|RpcAddress|RpcPort|InternalAddress| Role| CreateTime|TsFileSize| +--------+------------+-------+-------------+-------------+-----------+----------+----------+-------+---------------+------+-----------------------+----------+ | 9|SchemaRegion|Running|root.__system| 21| 0| 1| 0.0.0.0| 6667| 127.0.0.1|Leader|2025-08-01T17:37:01.555| | | 10| DataRegion|Running|root.__system| 21| 21| 1| 0.0.0.0| 6667| 127.0.0.1|Leader|2025-08-01T17:37:01.556| 8.27 KB| | 65|SchemaRegion|Running| root.ln| 1| 0| 1| 0.0.0.0| 6667| 127.0.0.1|Leader|2025-08-25T14:46:50.113| | | 66| DataRegion|Running| root.ln| 1| 1| 1| 0.0.0.0| 6667| 127.0.0.1|Leader|2025-08-25T14:46:50.425| 524 B| +--------+------------+-------+-------------+-------------+-----------+----------+----------+-------+---------------+------+-----------------------+----------+
Description: Updates configuration items. Changes take effect immediately without restarting if the items support hot modification.
Syntax:
setConfigurationStatement : SET CONFIGURATION propertyAssignments (ON INTEGER_VALUE)? ; propertyAssignments : property (',' property)* ; property : identifier EQ propertyValue ; propertyValue : DEFAULT | expression ;
Parameters:
property (',' property)*.DEFAULT: Resets the configuration to its default value.expression: A specific value (must be a string).Example:
IoTDB> SET CONFIGURATION ‘disk_space_warning_threshold’='0.05',‘heartbeat_interval_in_ms’='1000' ON 1;
Description: Loads manually modified configuration files and hot-loads the changes. Configuration items that support hot modification take effect immediately.
Syntax:
loadConfigurationStatement : LOAD CONFIGURATION localOrClusterMode? ; localOrClusterMode : (ON (LOCAL | CLUSTER)) ;
Parameters:
CLUSTER.LOCAL: Loads configuration only on the DataNode directly connected to the client.CLUSTER: Loads configuration on all DataNodes in the cluster.Example:
IoTDB> LOAD CONFIGURATION ON LOCAL;
Description: Sets the system status to either READONLY or RUNNING.
Syntax:
setSystemStatusStatement : SET SYSTEM TO (READONLY | RUNNING) localOrClusterMode? ; localOrClusterMode : (ON (LOCAL | CLUSTER)) ;
Parameters:
ON CLUSTER.Example:
IoTDB> SET SYSTEM TO READONLY ON CLUSTER;
Description: Flushes data from the memory table to disk.
Syntax:
flushStatement : FLUSH identifier? (',' identifier)* booleanValue? localOrClusterMode? ; booleanValue : TRUE | FALSE ; localOrClusterMode : (ON (LOCAL | CLUSTER)) ;
Parameters:
FLUSH root.ln, root.lnm.**).ON CLUSTER.Example:
IoTDB> FLUSH root.ln TRUE ON LOCAL;
Description: Starts a background task to scan and repair TsFiles, fixing issues such as timestamp disorder within data files.
Syntax:
startRepairDataStatement : START REPAIR DATA localOrClusterMode? ; localOrClusterMode : (ON (LOCAL | CLUSTER)) ;
Parameters:
ON CLUSTER.Example:
IoTDB> START REPAIR DATA ON CLUSTER;
Description: Pauses the background repair task. The paused task can be resumed by executing the START REPAIR DATA command again.
Syntax:
stopRepairDataStatement : STOP REPAIR DATA localOrClusterMode? ; localOrClusterMode : (ON (LOCAL | CLUSTER)) ;
Parameters:
ON CLUSTER.Example:
IoTDB> STOP REPAIR DATA ON CLUSTER;
This function has supported passing in a regionId list since V1.3.6, allowing multiple regions to be processed at one time.
Description: Expand the specified Region to the specified DataNode.
Syntax:
extendRegionStatement : EXTEND REGION <region_id>(, <region_id>)* TO <data_node_id> ;
Example:
IoTDB> EXTEND REGION 1,2,3 TO 3;
Description: Remove the specified Region from the specified DataNode.
Note: Manual capacity reduction can only reduce the number of replicas to 1 at most, and cannot be reduced to 0.
Syntax:
removeRegionStatement : REMOVE REGION <region_id>(, <region_id>)* FROM <data_node_id> ;
Example:
IoTDB> REMOVE REGION 1,2,3 FROM 2;
Description: Terminates one or more running queries.
Syntax:
killQueryStatement : KILL (QUERY queryId=string | ALL QUERIES) ;
Parameters:
queryId, use the SHOW QUERIES command.Example:
Terminate a specific query:
IoTDB> KILL QUERY 20250108_101015_00000_1;
Terminate all queries:
IoTDB> KILL ALL QUERIES;