Background merge operations are one of the most important components of ClickHouse®. Every insert creates immutable data parts, and the storage engine continuously merges these parts to keep query performance high and storage efficient. These merges also perform critical maintenance tasks such as applying TTL rules, removing expired records, recompressing data, and consolidating files.

For most workloads, this process happens quietly in the background. However, for organizations storing massive analytical datasets with hundreds of columns, background merges can become one of the largest consumers of memory.

ClickHouse® already introduced Vertical Merge, an optimization designed to reduce memory usage during merge operations by processing columns independently instead of entire rows. In ClickHouse 26.3, this optimization has been extended to TTL DELETE merges, significantly lowering memory consumption when expired rows are removed automatically.

This article explains why this enhancement matters, how Vertical Merge works internally, and why it improves the efficiency of large production deployments.

Why Merge Memory Matters