今天新安装配置了一台oracle数据库服务器,对在归档模式下的数据处理进行了测试。分别执行如下语句
create table test as select * from dba_objects;
或者
create table test nologging as select * from dba_objects;
insert into test select * from test;
或者
insert /*+ append */ into test select * from test;
其中insert 多次执行
这里run是执行的次数,insert count是插入的行数,nocommit是每次插入都不提交,commit是每次插入后提交,/*+append*/也是每次插入后都提交,/*+append*/ nologging是在第一次创建表的时候增加nologging参数
结果如下:
| run | insert count | nocommit | commit | /*+append*/ |
| 1 | 49790 | 00: 00: 00.31 | 00: 00: 00.29 | 00: 00: 00.73 |
| 2 | 99580 | 00: 00: 00.21 | 00: 00: 00.23 | 00: 00: 00.71 |
| 3 | 199160 | 00: 00: 01.73 | 00: 00: 02.75 | 00: 00: 04.21 |
| 4 | 398320 | 00: 00: 03.20 | 00: 00: 03.09 | 00: 00: 06.14 |
| 5 | 796640 | 00: 00: 32.85 | 00: 00: 32.21 | 00: 00: 12.11 |
| 6 | 1593280 | 00: 01: 11.93 | 00: 01: 10.89 | 00: 00: 23.18 |
| 7 | 3186560 | 00: 02: 18.70 | 00: 02: 33.29 | 00: 00: 45.90 |
| drop table | 00: 02: 38.31 | 00: 02: 42.01 | 00: 00: 00.56 | |
| archive log | 710MB | 710MB | 710MB | |
| run | insert count | /*+append*/ nologging |
| 1 | 49790 | 00: 00: 00.64 |
| 2 | 99580 | 00: 00: 00.92 |
| 3 | 199160 | 00: 00: 01.68 |
| 4 | 398320 | 00: 00: 02.82 |
| 5 | 796640 | 00: 00: 04.57 |
| 6 | 1593280 | 00: 00: 09.23 |
| 7 | 3186560 | 00: 00: 17.65 |
| drop table | 00: 00: 00.64 | |
| archive log | 900KB | |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12216142/viewspace-613951/ ,如需转载,请注明出处,否则将追究法律责任。