Note
- In V4.3.x, this variable was introduced in V4.3.3 BP1.
- In V4.2.x, this variable was introduced in V4.2.4.
Description
The enable_sql_plan_monitor variable specifies whether to record the SQL statements of the current session in the SQL plan monitor.
Required privileges
Query variables
Users in the
systenant and all user tenants can execute theSHOW VARIABLESstatement or view theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to query the value of the session system variable.Modify variables
Users in the
systenant and all user tenants can directly modify the value of a session system variable in their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | False |
| Valid values |
|
| Applicability | Session |
| Affects plans? | Yes |
| Modifiable? | Yes, you can modify it by using the SET statement. |
Examples
The SQL statements of the current session are recorded in the SQL plan monitor.
obclient> SET enable_sql_plan_monitor =Ture;