v.1.1.54245New Features
OPTIMIZE Query for Replicated Tables Can Run on Any Node
The OPTIMIZE query for a Replicated table can can run not only on the leader.
Why it matters
Previously, the OPTIMIZE query for Replicated tables in ClickHouse could only be run on the leader node. This limitation caused operational constraints, as running OPTIMIZE required targeting the leader node specifically. Allowing the OPTIMIZE query to run on any node simplifies management, improves flexibility and availability, and reduces dependency on the leader node, thus enhancing the usability of replicated tables in distributed environments.How to use it
To use this feature, simply run theOPTIMIZE query on any replica node of a Replicated table as you normally would. The system will handle the operation transparently without requiring you to connect specifically to the leader node.Example:
OPTIMIZE TABLE replicated_database.replicated_table FINAL;