The PURGE stored procedure removes a specified SQL statement from the plan cache.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
DBMS_PLAN_CACHE.PURGE (
sql_id VARCHAR2 NOT NULL,
schema VARCHAR2 DEFAULT NULL
global BOOLEAN DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| sql_id | The identifier of the SQL statement, which is 32 bytes in length. After the SQL statement is removed, all of its execution plans become invalid. |
| schema | The schema where execution plans are to be invalidated. If this parameter is set to NULL, no schema is specified, and execution plans in all schemas will become invalid. |
| global | Specifies whether to clear plan caches at the global level. The value FALSE indicates to clear only plan caches on the local server, and TRUE indicates to clear plan caches on all servers of the tenant. |