Note
- For V4.4.x, this parameter is available starting with V4.4.0.
- For V4.3.5, this parameter is available starting with V4.3.5 BP2.
Description
default_storage_cache_policy specifies the default cache policy for tenant-level storage_cache_policy. This parameter only takes effect for newly created tables.
Applicability
This parameter is applicable only to OceanBase Database in Shared-Storage (SS) mode.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.Notice
When you modify this parameter in an Oracle-compatible tenant or specify an Oracle-compatible tenant or other non-user tenant (such as the
systenant or the meta tenant) to modify this parameter, the parameter value can be modified, but the feature does not take effect. This is because the feature to specify the cache policy for hot data is available only in MySQL-compatible tenants.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | AUTO |
| 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. |
Considerations
- All newly created tables in the current tenant use the cache policy specified by
default_storage_cache_policyby default, unless thestorage_cache_policyparameter is explicitly specified for the tables. - Only user tables and indexes are affected by the
default_storage_cache_policyparameter. System tables are always set toAUTO.
Examples
Set the default cache policy for the current user tenant to
HOT.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT';Set the default cache policy for the
mysqltenanttenant toHOTin the system tenant.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT' TENANT = mysqltenant;