Note
For V4.6.0, this parameter is available starting with V4.6.0.
Description
enable_ttl specifies whether to enable the TTL feature in SQL mode. After you enable the TTL feature, expired data will be physically deleted during a major compaction.
Privilege requirements
Query the parameter
sysand all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
sysand user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | False |
| Value range |
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Examples
Enable the TTL feature for a specified user tenant.
obclient(root@sys)[(none)]> ALTER SYSTEM SET enable_ttl = True TENANT = tenant_name;Enable the TTL feature for the current user tenant.
obclient> ALTER SYSTEM SET enable_ttl = True;
References
Configure the execution time of the TTL task: ttl_duty_time
