zoukankan      html  css  js  c++  java
  • Oracle PL/SQL

    1、查询当前归档模式

    select name,log_mode from v$database;

    2、查询当前redo size

    select b.sid,a.name,a.value from v$sysstat a,v$mystat b where a.statistic#=b.statistic# and a.name like 'redo size%';

     3、在表为非归档模式下,且为nologging表,使用/*+ append*/进行insert操作可以减少大量的redo size。其中redo_size表为我们查询系统redo size表建立的视图

    SQL> select * from redo_size;
     
        VALUE
        ----------
        8397184
     
    SQL> insert into test_redos select * from dba_objects;
     
        71971 rows created.
     
    SQL> select * from redo_size;
     
        VALUE
        ----------
        16801072
     
    SQL> insert /*+ append */ into test_redos select * from dba_objects;
     
        71971 rows created.
     
    SQL> select * from redo_size;
     
        VALUE
        ----------
        16836516
     
    SQL> select (16801072-8397184)普通插入,(16836516-16801072) append插入 from dual;
     
        普通插入     APPEND插入
        ---------- ----------
        8403888      35444

    总结:

    非归档模式下:nologging表使用append能大量减少redo量。

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

  • 相关阅读:
    delphi 让子窗体显示最大化
    Delphi 中拖动无边框窗口的5种方法
    Delphi 非主窗体(即子窗体)在任务栏显示按钮
    电脑快捷键大全
    picpick快捷键
    is()
    animate()
    :animated
    css() 方法返回或设置匹配的元素的一个或多个样式属性。
    outerWidth()
  • 原文地址:https://www.cnblogs.com/ZeroMZ/p/10793799.html
Copyright © 2011-2022 走看看