ClickHouse Deletes Expired TTL Rows Only When Parts Merge
ClickHouse stores a per-part TTL expiry bound and removes expired rows during a merge, using a bit mask rather than a rewrite.
ClickHouse stores a per-part TTL expiry bound and removes expired rows during a merge, using a bit mask rather than a rewrite.
ClickHouse scores each projection by the marks it must read, including the parts it cannot serve, and picks the cheapest.
A RECOMPRESS TTL rewrites a whole part with a new codec once all of its rows have expired.
SummingMergeTree and AggregatingMergeTree combine rows inside the merge algorithm, group by group, as the sorted streams are walked.
A MergeTree part is written to a temp directory through a stack of write buffers and published by one atomic directory rename.