1,hint
model_min_analysis
1,/*+ model_min_analysis */
2,忽略一些spreadsheet rules的编译期间的优化工作,这个主要指的具体有依赖性关系的图表分析
3,其它一些spreadsheet优化,比如构建filter产生spreadsheet访问结构和有限的规则pruning
noappend
1,让插入表时通过非并行模式且以传统方式插入数据
3,传统方式是串行方式插入数据
2,direct path insert是并行模式插入
4,何谓direct path insert
SQL> create table t_append(a int);
model_min_analysis
1,/*+ model_min_analysis */
2,忽略一些spreadsheet rules的编译期间的优化工作,这个主要指的具体有依赖性关系的图表分析
3,其它一些spreadsheet优化,比如构建filter产生spreadsheet访问结构和有限的规则pruning
noappend
1,让插入表时通过非并行模式且以传统方式插入数据
3,传统方式是串行方式插入数据
2,direct path insert是并行模式插入
4,何谓direct path insert
SQL> create table t_append(a int);
表已创建。
SQL> explain plan for insert into t_append select level from dual connect by lev
el<=1e5;
el<=1e5;
已解释。
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Plan hash value: 1236776825
--------------------------------------------------------------------------------
--
| Id | Operation | Name | Rows | Cost (%CPU)| Time
|
|
--------------------------------------------------------------------------------
--
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | 1 | 2 (0)| 00:00:01
|
| 1 | LOAD TABLE CONVENTIONAL | T_APPEND | | |
|
|
|* 2 | CONNECT BY WITHOUT FILTERING| | | |
|
|
| 3 | FAST DUAL | | 1 | 2 (0)| 00:00:01
|
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter(LEVEL<=1e5)
已选择15行。
SQL> explain plan for insert /*+ append */ into t_append select level from dual
connect by level<=1e5;
connect by level<=1e5;
已解释。
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Plan hash value: 1541388231
--------------------------------------------------------------------------------
--
| Id | Operation | Name | Rows | Cost (%CPU)| Time
|
|
--------------------------------------------------------------------------------
--
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | 1 | 2 (0)| 00:00:01
|
| 1 | LOAD AS SELECT | T_APPEND | | |
|
|
|* 2 | CONNECT BY WITHOUT FILTERING| | | |
|
|
| 3 | FAST DUAL | | 1 | 2 (0)| 00:00:01
|
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter(LEVEL<=1e5)
已选择15行。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-751382/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-751382/