zoukankan      html  css  js  c++  java
  • 05396

    Examine the following command:
    SQL> ALTER TABLE booking SHRINK SPACE COMPACT;
    Which activity is performed when the preceding command is executed?
    A. The shrink operation touches every block in the BOOKING table
    B. The high-water mark (HWM) for the BOOKING table is shifted from its original position
    C. The progress of the shrink operation is saved in the bitmap blocks of the BOOKING table
    D. The data manipulation language (DML) triggers on the BOOKING table are executed because the shrink operation is internally handled by the INSERT/DELETE operation

      SHRINK SPACE 可以作用在表,组织索引表,索引,分区,子分区,物化视图或物化视图日志上。如果并不想释放这些未使用的空间,可以使用 coalesce。还可以增加 cascade 来对所有相关的段对象进操作。
    --需要自动段管理和开启行迁移,并且关闭基于 rowid 的触发器。
      如果有长时间运行的查询,而且这些查询可能跨越收缩操作,并尝试从已回收的块中读取数据,则COMPACT 子句会很有用。指定 SHRINK SPACE COMPACT 子句时,碎片整理和压缩结果保存到了磁盘(表中的位图块中)。 这样就将一个长的操作,分为 2 个短操作,首先使用 compact,进行整理和压缩,然后再在业务低峰期运行 shrink space,此时数据不必再重新移动,将进行空间的重新分配和重置高位。
    还可以使用 DEALLOCATE UNUSED 来释放未使用的空间 (回收高水位之上的未使用块)
    ALTER TABLE table DEALLOCATE UNUSED KEEP integer;
    ALTER INDEX index DEALLOCATE UNUSED KEEP integer;
    ALTER CLUSTER cluster DEALLOCATE UNUSED KEEP integer;
    keep 后面的数值是 检查 DBA_FREE_SPACE 视图中的数值

  • 相关阅读:
    UIProgressView的详细使用
    Android拍照上传代码样例
    UILabel的详细使用及特殊效果
    TextView属性android:ellipsize实现跑马灯效果
    Android中WebView实现Javascript调用Java类方法
    有效获取状态栏(StatusBar)高度
    详解iPhone Tableview分批显示数据
    TextView显示插入的图片
    ObjectiveC语法快速参考
    UISegmentedControl的详细使用
  • 原文地址:https://www.cnblogs.com/Babylon/p/7839134.html
Copyright © 2011-2022 走看看