数据的插入
insert /*+ append */into emp
nologging
select * from t_employees;
commit;
解释:复制数据,速度最快
/*+ append */ : 是hint,直接在高水位插入数据
nologging : 不要产生redo记录.
nologging好像是不能用于dml语句,建表的时候可以指定nologging选项.
不过还有一点要注意的是如果你的数据库的运行模式是非归档模式的话,那你加不加nologging就没多大意义了,用上APPEND 就够了。 正确的使用方式是:alter table dept nologging
create table bt as select * from all_objects where 1=0;
insert into bt select * from all_objects;
insert /*+ append*/ into bt select * from all_objects;
@>
insert
/*+ append*/
into bt
select *
from all_objects;
6074 rows created.
@> select count(*) from bt;
select count(*) from bt
*
ERROR at line 1:
ORA-12838: cannot read/modify an object after modifying it in parallel
6074 rows created.
@> select count(*) from bt;
select count(*) from bt
*
ERROR at line 1:
ORA-12838: cannot read/modify an object after modifying it in parallel
由于是串行执行的(串行direct-load),必须进行显示的提交之后,才能做查询
转载于:https://blog.51cto.com/tianya23/357495