Skip to content

Commit

Permalink
set TTL to both table and database
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Aug 30, 2024
1 parent dbc6b95 commit 76ecf19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/user-guide/manage-data/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,9 @@ You can also create a database-level TTL policy. For example, the following SQL
CREATE DATABASE test WITH ('ttl'='7d');
```

You can set TTL policies at both the table level and the database level simultaneously.
If a table has its own TTL policy,
it will take precedence over the database TTL policy.
Otherwise, the database TTL policy will be applied to the table.

For more information about TTL policies, please refer to the [CREATE](/reference/sql/create.md) statement.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ CREATE TABLE monitor (
CREATE DATABASE test WITH ('ttl'='7d');
```

有关 TTL 策略的更多信息,请参阅 [CREATE](/reference/sql/create.md) 语句。

你可以同时为 table 和 database 设置 TTL 策略。
如果 table 有自己的 TTL 策略,则该策略将优先于 database 的 TTL 策略,
否则 database 的 TTL 策略将被应用于 table。

有关 TTL 策略的更多信息,请参阅 [CREATE](/reference/sql/create.md) 语句。

0 comments on commit 76ecf19

Please sign in to comment.