手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle 减少redo size的方法

[日期:2013-03-06] 来源:Linux社区  作者:laoshangxyc [字体:大 中 小]

三、在归档force logging模式下:

改变SCOTT用户的默认表空间为force logging模式

SQL> select username,default_tablespace from dba_users where username='SCOTT';

USERNAME                      DEFAULT_TABLESPACE
------------------------------ ------------------------------
SCOTT                          USERS
--在数据级别置为force logging模式语句为 alter database force logging;
SQL> alter tablespace users force logging;

Tablespace altered.

继续测试

SQL> select * from redo_size;

    VALUE
----------
  25488368

SQL> insert into test_redos select * from dba_objects;

72010 rows created.

SQL> select * from redo_size;

    VALUE
----------
  33973556

SQL> insert /*+ append */ into test_redos select * from dba_objects;

72010 rows created.

SQL> select * from redo_size;

    VALUE
----------
  42492396

SQL> select (33973556-25488368)普通插入,(42492396-33973556) append插入 from dual;

  普通插入 APPEND插入
---------- ----------
  8485188    8518840

可以看出在表空间在force logging模式下append不能减少redo量

总结:

非归档模式下:append能大量减少redo量。

归档模式下:在表空间和数据库级非force logging模式下,表如果是nologging,则append能大量减少redo量。

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux
相关资讯       Oracle redo  redo size 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款