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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值