You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/altinity-kb-queries-and-syntax/ttl/modify-ttl.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,14 @@ ALTER TABLE tbl MODIFY SETTING materialize_ttl_recalculate_only=1;
47
47
48
48
It does mean, that TTL rule will not be applied during `ALTER TABLE tbl MODIFY (ADD) TTL ...` query.
49
49
50
+
After this you can apply TTL (MATERIALIZE) per partition manually:
51
+
52
+
```sql
53
+
ALTERTABLE tbl MATERIALIZE TTL [IN PARTITION partition | IN PARTITION ID 'partition_id'];
54
+
```
55
+
56
+
The idea of `materialize_ttl_after_modify = 1` is to use `ALTER TABLE tbl MATERIALIZE TTL IN PARTITION xxx; ALTER TABLE tbl MATERIALIZE TTL IN PARTITION yyy;` and materialize TTL gently or drop/move partitions manually until the old data without/old TTL is processed.
57
+
50
58
MATERIALIZE TTL done via Mutation:
51
59
1. ClickHouse create new parts via hardlinks and write new ttl.txt file
52
60
2. ClickHouse remove old(inactive) parts after remove time (default is 8 minutes)
0 commit comments