use alter_sync = 0 to prevent Clickhouse waiting for actions to be executed on replicas by OPTIMIZE query (alter_sync).
use optimize_skip_merged_partitions = 1 to prevent Clickhouse rewriting the one part even if they are already merged into a single part (optimize_skip_merged_partitions).
alter_sync = 0
to prevent Clickhouse waiting for actions to be executed on replicas byOPTIMIZE
query (alter_sync).optimize_skip_merged_partitions = 1
to prevent Clickhouse rewriting the one part even if they are already merged into a single part (optimize_skip_merged_partitions).