Note
This variable is available starting with V4.3.5 BP1.
Description
ENABLE_OPTIMIZER_ROWGOAL specifies whether the optimizer considers the impact of row goals (such as LIMIT operators) when estimating cardinality.
Privilege requirements
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 view the value of a global system variable.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 view the value of a session system variable.
Modify variables
Global level
systenant can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle user tenants must 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.
Attributes
| Attribute | Description |
|---|---|
| Type | Enum |
| Default value | AUTO |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET or ALTER SESSION SET statement to modify the value. |
Examples
Execute the following command to enable row goals for estimation.
Global level
obclient> SET GLOBAL enable_optimizer_rowgoal=ON;Session level
obclient> SET enable_optimizer_rowgoal=ON;