Skip to content

Commit 449798d

Browse files
authored
clarification of using MATERIALIZE TTL IN PARTITION
1 parent c7d3fb1 commit 449798d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/en/altinity-kb-queries-and-syntax/ttl/modify-ttl.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ ALTER TABLE tbl MODIFY SETTING materialize_ttl_recalculate_only=1;
4747

4848
It does mean, that TTL rule will not be applied during `ALTER TABLE tbl MODIFY (ADD) TTL ...` query.
4949

50+
After this you can apply TTL (MATERIALIZE) per partition manually:
51+
52+
```sql
53+
ALTER TABLE 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+
5058
MATERIALIZE TTL done via Mutation:
5159
1. ClickHouse create new parts via hardlinks and write new ttl.txt file
5260
2. ClickHouse remove old(inactive) parts after remove time (default is 8 minutes)

0 commit comments

Comments
 (0)