Note
This variable is available starting with V4.2.4.
Description
enable_sql_plan_monitor specifies whether to record SQL statements in the SQL plan monitor for the current session.
Privilege requirements
Query variables
systenants 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
systenants and all user tenants can modify the values of session system variables in their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | False |
| Value range |
|
| Scope | Session |
| Impact on plan | Yes |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Record all SQL statements in the current session in the SQL plan monitor.
obclient> SET enable_sql_plan_monitor =True;