Description
You can use this statement to add binding and throttling rules for outlines created using SQL_TEXT.
Syntax
ALTER OUTLINE outline_name ADD stmt [ TO target_stmt]
Parameters
| Parameter | Description |
|---|---|
| outline_name | The name of the outline to be created. |
| stmt | A DML statement with hints and original parameters. |
| TO target_stmt | If you do not specify the TO target_stmt clause, when the parameterized SQL statement accepted by the database is the same as the parameterized statement with hints removed, the SQL statement is bound to hints in the statement to generate an execution plan. Notice When you specify the target_stmt, ensure that the statement exactly matches the target_stmt after hints are removed. |
Examples
- Executing ALTER OUTLINE to add throttling rules
obclient> ALTER OUTLINE ol_1 ADD SELECT /*+max_concurrent(1)*/ * FROM t1 WHERE c1 = 1 and c2 = ?;
obclient> ALTER OUTLINE ol_1 ADD SELECT /*+max_concurrent(1)*/ * FROM t1 WHERE c1 = ? and c2 = 1;
- Executing ALTER OUTLINE to add an execution plan
obclient> CREATE OUTLINE ol_2 on SELECT /*+max_concurrent(1)*/ * FROM t1,t2 WHERE t1.c1 = 1;
obclient> ALTER OUTLINE ol_2 add SELECT /*+use_nl(t2)*/ * FROM t1,t2 WHERE t1.c1 = 1;
Notes
Only one execution plan can be specified for the same
outline_name. If an execution plan has been specified using theCREATE OUTLINEstatement, you cannot add the execution plan by executingALTER OUTLINE.Similar to the
CREATE OUTLINEstatement, you cannot specify both throttling rules and an execution plan when executing theALTER OUTLINEstatement.