Dev Tools · 1h ago
ClickHouse OPTIMIZE TABLE FINAL: When to Use and Avoid
Scheduled OPTIMIZE TABLE FINAL can degrade ClickHouse performance by creating oversized parts that bypass normal merge guardrails. It forces physical rewrites consuming I/O and CPU, and may cause duplicates to reaccumulate. For deduplication, use SELECT FINAL instead, and fix 'too many parts' by batching inserts or using asynchronous inserts.
Meridian48 take
This is a practical warning for engineers relying on a common but dangerous workaround; the real fix is better ingestion patterns, not forced merges.
Read the full reporting
OPTIMIZE TABLE ... FINAL in ClickHouse: when to use it, when to avoid it, and how merges work →
DEV Community
clickhousedatabase-performance