通过添加hint加速insert操作

来源:互联网 发布:mac终端颜色配置 编辑:程序博客网 时间:2024/06/02 19:58
EODA@PROD1> select count(*) from sys.tt;  COUNT(*)----------    480000Elapsed: 00:00:01.15EODA@PROD1> create table t_ins as select * from sys.tt where 0=1;Table created.Elapsed: 00:00:00.07EODA@PROD1> create table t_ins_nolog as select * from sys.tt where 0=1;Table created.Elapsed: 00:00:00.07EODA@PROD1> alter table t_ins_nolog nologging;Table altered.Elapsed: 00:00:00.03EODA@PROD1> insert into t_ins select * from sys.tt;480000 rows created.Elapsed: 00:00:06.77Statistics----------------------------------------------------------  0  recursive calls      42716  db block gets      16934  consistent gets257  physical reads   46494940  redo size   --46494940922  bytes sent via SQL*Net to client       1006  bytes received via SQL*Net from client  4  SQL*Net roundtrips to/from client  1  sorts (memory)  0  sorts (disk)     480000  rows processed EODA@PROD1> insert /*+append*/ into t_ins_nolog select * from sys.tt;480000 rows created.Elapsed: 00:00:00.23  Statistics----------------------------------------------------------  0  recursive calls       5908  db block gets       5678  consistent gets       5670  physical reads      10348  redo size  --10348907  bytes sent via SQL*Net to client       1024  bytes received via SQL*Net from client  4  SQL*Net roundtrips to/from client  1  sorts (memory)  0  sorts (disk)     480000  rows processed

原创粉丝点击