ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 各种insert插入速度比较

各种insert插入速度比较

原创 Linux操作系统 作者:lcmlsj 时间:2018-12-16 15:06:03 0 删除 编辑

SQL> select count(*) from t;

COUNT(*)
----------
5442048
***********************************
SQL> alter table t1 nologging;
SQL> insert /*+append*/ into t1
2 select * from t;

5442048 rows created.

Elapsed: 00:00:55.73
****************************
SQL> create table t1 nologging parallel (degree 2) as select * from t;

Table created.

Elapsed: 00:00:56.79

********************************
SQL> insert /*+APPEND */ into t1
2 select /*+ parallel(t,4) */ * from t;

5442048 rows created.

Elapsed: 00:01:38.39

***********************************
alter table t1 nologging;
SQL> insert into t1
2 select * from t;

5442048 rows created.

Elapsed: 00:01:46.18
***********************************


SQL> alter table t1 logging;

Table altered.
SQL> insert into t1
2 select * from t;

5442048 rows created.

Elapsed: 00:02:03.51


*********************************
SQL> create table t1
2 as
3 select * from t;

Table created.

Elapsed: 00:03:03.34


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9599/viewspace-472936/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2002-04-09

  • 博文量
    100
  • 访问量
    114098