The LOAD_PLANS_FROM_CURSOR_CACHE procedure reads one or more SQL plans from the plan cache as the baseline plan.
Syntax
DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (
database_name VARCHAR(65535),
sql_id VARCHAR(65535),
plan_hash_value DECIMAL DEFAULT NULL,
is_fixed VARCHAR(65535) DEFAULT 'NO',
enabled VARCHAR(65535) DEFAULT 'YES'
)
RETURN DECIMAL;
Parameters
| Parameter | Description |
|---|---|
| database_name | The name of the database. This parameter is required only in MySQL-compatible mode. |
| sql_id | The SQL_ID of the SQL statement to be loaded. |
| plan_hash_value | The Plan Hash Value of the plan to be loaded. If the value is NULL, all plans in the plan cache for the specified SQL statement are loaded as the baseline plan. |
| is_fixed | The is_fixed attribute of the loaded baseline plan. |
| enabled | The enabled attribute of the loaded baseline plan. |
Examples
DECLARE
v_load_plans number;
BEGIN
v_load_plans := DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE(
sql_id => '529F6E6454EF579C7CC265D1F6131D70',
plan_hash_value => 13388268709115914355);
END;
/