Skip to content

Commit

Permalink
add serverless ttl job interval desc (#18420)
Browse files Browse the repository at this point in the history
* add serverless ttl job interval desc

Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
ystaticy committed Jul 30, 2024
1 parent e344a45 commit 4edeff4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tidb-cloud/serverless-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ We are constantly filling in the feature gaps between TiDB Serverless and TiDB D
- [Changefeed](/tidb-cloud/changefeed-overview.md) is not supported for TiDB Serverless currently.
- [Data Migration](/tidb-cloud/migrate-from-mysql-using-data-migration.md) is not supported for TiDB Serverless currently.

### Time to live (TTL)

- In TiDB Serverless, the [`TTL_JOB_INTERVAL`](/time-to-live.md#ttl-job) attribute for a table is fixed at `15m` and cannot be modified. This means that TiDB Serverless schedules a background job every 15 minutes to clean up expired data.

### Others

- Transaction can not last longer than 30 minutes.
Expand Down
8 changes: 8 additions & 0 deletions time-to-live.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ CREATE TABLE orders (

## TTL job

<CustomContent platform="tidb-cloud">

> **Note:**
>
> In TiDB Serverless, the `TTL_JOB_INTERVAL` attribute for a table is fixed at `15m` and cannot be modified. This means that TiDB Serverless schedules a background job every 15 minutes to clean up expired data.

</CustomContent>

For each table with a TTL attribute, TiDB internally schedules a background job to clean up expired data. You can customize the execution period of these jobs by setting the `TTL_JOB_INTERVAL` attribute for the table. The following example sets the background cleanup jobs for the table `orders` to run once every 24 hours:

```sql
Expand Down

0 comments on commit 4edeff4

Please sign in to comment.