Nologging append 对 产生redo log 的影响

表空间: nologging


基本上,insert append 产生少量redo,insert into nologging 和insert 效果一样。

[@more@]--------------------------------------------------------------------------------------------------------------------------

SQL> SQL> insert into mytest select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');




VALUE
----------
2590940

SQL> SQL> SQL> SQL> select (2590940 - 1735620 ) from dual;


(2590940-1735620)
-----------------
855320

SQL> SQL>
---------------------------------------------------------------------------------------------------------------------------
SQL> SQL> insert into mytest nologging select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');




VALUE
----------
3445824

SQL> SQL> SQL> SQL> select (3445824 - 2609640 ) from dual;


(3445824-2609640)
-----------------
836184
--------------------------------------------------------------------------------------------------------------
SQL> SQL> insert /*+append */ into mytest select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------


3490752

SQL> SQL> SQL> SQL> select (3490752 - 3465328) from dual;


(3490752-3465328)
-----------------
25424

SQL> SQL>
-----------------------------------------------------------------------------------------------------------------
SQL> insert /*+ append */ into mytest nologging select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');




VALUE
----------
3535296

SQL> SQL> SQL> SQL> select (3535296 - 3509872) from dual;


(3535296-3509872)
-----------------
25424
------------------------------------------------------------------------------------------------------------------------------------
Nologging::::::::::::



SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------


3645876

SQL> SQL> SQL> SQL>

SQL> SQL> select


SQL> SQL> insert into mytest select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------
4482064

SQL> SQL> select (4482064 - 3645876 ) from dual;


(4482064-3645876)
-----------------
836188

SQL> SQL>
----------------------------------------------------------------------------------------------------------------------------

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');




VALUE
----------
4482064

SQL> SQL> SQL> SQL>

SQL> SQL>

SQL> SQL> truncate table mytest;


Table truncated.

SQL> SQL> insert into mytest nologging select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');




VALUE
----------
5336988

SQL> SQL> SQL> SQL> select (5336988 - 4482064 ) from dual;


(5336988-4482064)
-----------------
854924

SQL> SQL>
---------------------------------------------------------------------------------------------------------------------------
SQL> SQL> truncate table mytest;


Table truncated.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------
5355704

SQL> SQL> insert /*+ append */ into mytest select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------
5381128

SQL> SQL> select (5381128 - 5355704) from dual;


(5381128-5355704)
-----------------
25424

SQL> SQL>
-----------------------------------------------------------------------------------------------------------------------------------------------
SQL> SQL> truncate table mytest;


Table truncated.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------
5400248

SQL> SQL> insert /*+ append */ into mytest nologging select * from user_tables;


3988 rows created.

SQL> SQL> select value from v$mystat where statistic# in (select statistic# from v$sysstat where name = 'redo size');


VALUE
----------
5425672

SQL> SQL> select (5425672 - 5400248) from dual;


(5425672-5400248)
-----------------
25424

SQL> SQL>
--------------------------------------------------------------------------------------------------------------

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

转载于:http://blog.itpub.net/21342557/viewspace-1032349/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值