数据的插入
原创
©著作权归作者所有:来自51CTO博客作者tianya23的原创作品,请联系作者获取转载授权,否则将追究法律责任
数据的插入
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
由于是串行执行的(串行direct-load),必须进行显示的提交之后,才能做查询