zoukankan      html  css  js  c++  java
  • OCP-1Z0-053-V12.02-96题

     

    96.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

    Answer: C

    答案解析:

    参考:http://blog.csdn.net/rlhua/article/details/13431595

    如果有长时间运行的查询,而且这些查询可能跨越收缩操作,并尝试从已回收的块中读取数据,则COMPACT子句会很有用。指定SHRINK SPACE COMPACT子句时,收缩操作的进度将保存在相应段的位图块中。这意味着下次在同一个段上执行收缩操作时,Oracle DB Server 可以记住已经执行过的操作。


    官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_3001.htm#SQLRF53315


    COMPACT If you specify COMPACT, then Oracle Database only defragments the segment space and compacts the table rows for subsequent release. The database does not readjust the high water mark and does not release the space immediately (B wrong). You must issue another ALTER TABLE ... SHRINK SPACE statement later to complete the operation. This clause is useful if you want to accomplish the shrink operation in two shorter steps rather than one longer step.

    For an index or index-organized table, specifying ALTER [INDEX | TABLE] ... SHRINK SPACE COMPACT is equivalent to specifying ALTER [INDEX | TABLE ... COALESCE. Theshrink_clause can be cascaded (refer to the CASCADE clause, which follows) and compacts the segment more densely than does a coalesce operation, which can improve performance. However, if you do not want to release the unused space, then you can use the appropriate COALESCE clause.


  • 相关阅读:
    P2056 [ZJOI2007]捉迷藏
    P2993 [FJOI2014]最短路径树问题
    P4149 [IOI2011]Race 点分治
    P2634 [国家集训队]聪聪可可 点分治
    [APIO2008]免费道路
    [luogu4255]公主の#18文明游戏
    [ZJOI2010]基站选址
    [POI2011]Meteors
    [SCOI2015]国旗计划
    [BZOJ4373]算术天才⑨与等差数列
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316637.html
Copyright © 2011-2022 走看看