Note
For OceanBase Database V4.3.5, this parameter is introduced starting from V4.3.5 BP2.
Description
default_storage_cache_policy specifies the default cache policy. It is the default value of the storage_cache_policy parameter at the tenant level. This parameter takes effect only on new tables.
Applicability
This parameter applies only to OceanBase Database's Shared Storage (SS) mode.
Privilege requirements
Query the parameter
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Both the
systenant and user tenants can modify this parameter.Notice
Due to a limitation, manually specifying the hot data cache policy only takes effect in MySQL-compatible tenants. If you modify this parameter in an Oracle-compatible tenant, or if the
systenant specifies an Oracle-compatible tenant or another non-user tenant (such as thesystenant or Meta tenant) to modify this parameter, the modification will be successful but the feature will not take effect.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | AUTO |
| Value range |
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify this parameter. |
| Effective only after OBServer restart | No, the setting takes effect immediately. |
Considerations
- By default, all new tables in the current tenant use the cache strategy specified by
default_storage_cache_policyunless the cache strategy is explicitly specified by thestorage_cache_policyparameter. - Only user tables and indexes are affected by the
default_storage_cache_policyparameter. System tables are not affected and always use theAUTOsetting.
Examples
Set the default cache strategy for the current tenant to
HOTin a user tenant.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT';Set the default cache strategy for the
mysqltenanttenant toHOTin thesystenant.obclient> ALTER SYSTEM SET default_storage_cache_policy='HOT' TENANT = mysqltenant;