The PURGE procedure is used to remove specified SQL statements from the plan cache.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only 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 SQL identifier, which is 32 bytes in length. After an SQL statement is removed, all of its execution plans become invalid. |
| schema | The schema from which the execution plans are to be removed. If this parameter is set to NULL, the execution plans of all schemas become invalid. |
| global | If the value of this parameter is FALSE, the plan cache of the current server is cleared. If the value of this parameter is TRUE, the plan cache of all servers in the current tenant is cleared. |