ALTER OUTLINE
Description
This statement is used to add throttling rules and bind outlines. It only supports modifying outlines created using the SQL_TEXT option.
Syntax
ALTER OUTLINE outline_name ADD stmt [ TO target_stmt ];
Parameters
| Parameter | Description |
|---|---|
| outline_name | The name of the outline to be modified. |
| stmt | A DML statement that typically includes hints and original parameters. |
| TO target_stmt | If TO target_stmt is not specified, it means that if the SQL statement, after parameterization, matches the stmt statement with hints removed, the SQL statement will be bound to the execution plan generated by the hints in stmt. If you want to fix the execution plan for a statement with hints, you need to use TO target_stmt to specify the original SQL statement. Notice: When using target_stmt, the stmt and target_stmt statements must be identical after removing the hints. |
Examples
-
Add a throttling rule using
ALTER OUTLINE.ALTER OUTLINE ol_1 ADD SELECT /*+max_concurrent(1)*/ * FROM t1 WHERE c1 = 1 and c2 = ?;
ALTER OUTLINE ol_1 ADD SELECT /*+max_concurrent(1)*/ * FROM t1 WHERE c1 = ? and c2 = 1; -
Add an execution plan using
ALTER OUTLINE.CREATE OUTLINE ol_2 ON SELECT /*+max_concurrent(1)*/ * FROM t1,t2 WHERE t1.c1 = 1;
ALTER OUTLINE ol_2 ADD SELECT /*+use_nl(t2)*/ * FROM t1,t2 WHERE t1.c1 = 1;
Considerations
-
Only one execution plan can be specified for the same
outline_name. If an execution plan is specified using theCREATE OUTLINEstatement, it cannot be added again when executingALTER OUTLINE. -
Similar to
CREATE OUTLINE, you cannot specify both throttling rules and execution plans at the same time when usingALTER OUTLINE.