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 strategy for tables. The default value of the storage_cache_policy parameter at the tenant level is effective only 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 the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.Notice
If you modify this parameter in an Oracle tenant or in the
systenant by specifying an Oracle tenant or another non-user tenant (such as thesystenant or the meta tenant), the value of the parameter can be modified, but the feature does not take effect. This is because the feature to manually specify the cache strategy for hot data is effective only in MySQL mode.
Attributes
| Attribute | Description |
|---|---|
| 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 strategy specified by
default_storage_cache_policyif thestorage_cache_policyparameter is not explicitly specified. - Only user tables and indexes are affected by the
default_storage_cache_policyparameter. System tables are always set toAUTO.
Examples
In a user tenant, set the default cache strategy to
HOT.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT';In the
systenant, set the default cache strategy toHOTfor themysqltenanttenant.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT' TENANT = mysqltenant;
