ORACLE使用STOREDOUTLINE固化执行计划--CURSOR_SHARING(二)

2014-11-24 17:05:55 · 作者: · 浏览: 2
----------- select count(*) from t1 where object_id < :"SYS_B_0" Plan hash value: 3900446664 -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | | | 3 (100)| | | 1 | SORT AGGREGATE | | 1 | 13 | | | PLAN_TABLE_OUTPUT ---------------------------------------------------------------------------------------------------- |* 2 | INDEX RANGE SCAN| I1 | 4411 | 57343 | 3 (0)| 00:00:01 | -------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("OBJECT_ID"<:SYS_B_0) Note ----- - outline "SYS_OUTLINE_14010314202705001" used for this statement --已经使用了自动生成的存储纲要,但是使用autotrace或者explain却无法表明这点,可能是个bug PLAN_TABLE_OUTPUT ---------------------------------------------------------------------------------------------------- 已选择23行。

另外有一点需要特别注意: When Oracle Database creates an outline, plan stability examines the optimization results using the same data used to generate the execution plan. That is, Oracle Database uses the input to the execution plan to generate an outline, and not the execution plan itself.