Overview
enable_ttl specifies whether to enable the TTL feature in SQL mode. After the TTL feature is enabled, expired data will be physically deleted during a major compaction task.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Bool |
| Default Value | False |
| Value range |
|
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Configuration example
The system tenant enables the TTL feature for the specified user tenant.
obclient(root@sys)[(none)]> ALTER SYSTEM SET enable_ttl = True TENANT = tenant_name;The user tenant has enabled the TTL feature for itself.
obclient> ALTER SYSTEM SET enable_ttl = True;
References
Configure the scheduled execution time for the TTL task: ttl_duty_time