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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,21 +39,21 @@ MATERIALIZE TTL:
39
39
1. Recalculate TTL (Kinda cheap, it read only column participate in TTL)
40
40
2. Apply TTL (Rewrite of table data for all columns)
41
41
42
-
You also can disable apply TTL substep via `materialize_ttl_recalculate_only` merge_tree setting (by default it's 0, so clickhouse will apply TTL expression)
42
+
You also can only disable apply TTL substep via `materialize_ttl_recalculate_only` merge_tree setting (by default it's 0, so clickhouse will apply TTL expression)
It does mean, that TTL rule will not be applied during `ALTER TABLE tbl MODIFY (ADD) TTL ...` query.
48
+
It does mean, that TTL rule will not be applied during `ALTER TABLE tbl MODIFY (ADD) TTL ...` query and data is now going to be rewritten.
49
49
50
-
After this you can apply TTL (MATERIALIZE) per partition manually:
50
+
After this you can apply TTL (MATERIALIZE) per partition manually (which will apply the TTL and rewrite data)
51
51
52
52
```sql
53
53
ALTERTABLE tbl MATERIALIZE TTL [IN PARTITION partition | IN PARTITION ID 'partition_id'];
54
54
```
55
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.
56
+
The idea of `materialize_ttl_after_modify = 0` and `materialize_ttl_recalculate_only = 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
57
58
58
MATERIALIZE TTL done via Mutation:
59
59
1. ClickHouse create new parts via hardlinks and write new ttl.txt file
0 commit comments