Note
This variable is available starting with OceanBase Database V4.2.0.
Description
optimizer_features_enable specifies the OceanBase Database version whose optimizer features are enabled.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to obtain the values of global system variables.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to obtain the values of session system variables.
Modify variables
Global level
systenant can directly modify the value of a global system variable.MySQL user tenants need to have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle user tenants need to have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenant and all user tenants can directly modify the value of a session system variable of the current tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | 4.2.5.4 |
| Value range | The version number of the OceanBase Database version, such as '4.0.0.0'. |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Enable the optimizer features of OceanBase Database V4.2.5.4.
Global level
obclient> SET GLOBAL optimizer_features_enable='4.2.5.4';Session level
obclient> SET optimizer_features_enable='4.2.5.4';