v.18.4Improvement
Support for KILL and OPTIMIZE Queries with ON CLUSTER
Support for runningKILLandOPTIMIZEqueries that specifyON CLUSTERWinter Zhang.
Why it matters
This feature allows users to executeKILL and OPTIMIZE queries across all nodes of a specified cluster, simplifying cluster-wide management tasks. It enables efficient termination of queries and optimization of tables on distributed setups, improving operational control and resource management.How to use it
Use theKILL or OPTIMIZE statement followed by the ON CLUSTER <cluster_name> clause to run the command across all nodes in the cluster. For example:KILL QUERY WHERE query_id = 'some_id' ON CLUSTER my_cluster;
OPTIMIZE TABLE my_table ON CLUSTER my_cluster;