Skip to content

Commit 97d5152

Browse files
authored
Improve clarity on TTL application and settings
Clarify the effects of the materialize_ttl_recalculate_only setting and update the explanation of materialize TTL after modification.
1 parent 1f50105 commit 97d5152

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ MATERIALIZE TTL:
3939
1. Recalculate TTL (Kinda cheap, it read only column participate in TTL)
4040
2. Apply TTL (Rewrite of table data for all columns)
4141

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)
4343

4444
```sql
4545
ALTER TABLE tbl MODIFY SETTING materialize_ttl_recalculate_only=1;
4646
```
4747

48-
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.
4949

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)
5151

5252
```sql
5353
ALTER TABLE tbl MATERIALIZE TTL [IN PARTITION partition | IN PARTITION ID 'partition_id'];
5454
```
5555

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.
5757

5858
MATERIALIZE TTL done via Mutation:
5959
1. ClickHouse create new parts via hardlinks and write new ttl.txt file

0 commit comments

Comments
 (0)