您的位置:首页 > 其它

OCP-1Z0-053-V12.02-96题

2013-11-01 08:58 302 查看
 
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
.
The
shrink_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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: