insert append vs. create table as

Posted by Vincent on June 5, 2009

create table tmp_xf_1 as select * from tmp_xf_tst;

1. 13:39:01 SQL> create table tmp_xf_1 as select * from tmp_xf_tst;

Table created.

Elapsed: 00:00:56.01

create table tmp_xf_2 nologging as select * from tmp_xf_tst;

2. 13:40:29 SQL> create table tmp_xf_2 nologging as select * from tmp_xf_tst;

Table created.

Elapsed: 00:00:44.69

create table tmp_xf_5 nologging parallel(degree 4) as select * from tmp_xf_tst t;

Table created.

Elapsed: 00:00:15.23

create table tmp_xf_5 parallel(degree 4) as select * from tmp_xf_tst t;

Table created.

Elapsed: 00:00:48.27

3. create table tmp_xf_3 as select * from tmp_xf_tst where 1=2;

13:47:14 SQL> insert into tmp_xf_3 select * from tmp_xf_tst ;

9734310 rows created.

Elapsed: 00:01:54.08

4. create table tmp_xf_4 as select * from tmp_xf_tst where 1=2;

13:53:42 SQL> insert /*+append*/ into tmp_xf_4 select * from tmp_xf_tst ;

9734310 rows created.

Elapsed: 00:01:01.32

参看:

http://hi.baidu.com/dba_james/blog/item/6909ec2b7e0a742ad52af128.html


This work is licensed under a CC A-S 4.0 International License.