v.19.14Improvement

Mergetree Now Has an Additional Option Ttl_only_drop_parts (disabled by Default) to Avoid Partial Pruning of Parts, So That They Dropped Completely When All the Rows in a Part Are Expired

MergeTree now has an additional option ttl_only_drop_parts (disabled by default) to avoid partial pruning of parts, so that they dropped completely when all the rows in a part are expired. #6191 (Sergi Vladykin)
MergeTree tables now support the ttl_only_drop_parts option to ensure that parts are only dropped entirely when all rows within them are expired.

Why it matters

This feature prevents partial pruning of parts during TTL-based data expiration. By dropping parts only when all rows are expired, it avoids inefficient partial deletions and improves maintenance and storage management.

How to use it

Enable this feature by setting the ttl_only_drop_parts option to 1 (true) in the table's CREATE or ALTER statement. By default, it is disabled (set to 0). For example:

ALTER TABLE your_table MODIFY SETTING ttl_only_drop_parts = 1;