Which activity is performed when the preceding command is executed?

Examine the following command:
SQL> ALTER TABLE booking SHRINK SPACE COMPACT;
Which activity is performed when the preceding command is executed?

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



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Jake from SF

Jake from SF

C is correct:

https://docs.oracle.com/cd/B28359_01/server.111/b28310/schema003.htm

The COMPACT clause lets you divide the shrink segment operation into two phases. When you specify COMPACT, Oracle Database defragments the segment space and compacts the table rows but postpones the resetting of the high water mark and the deallocation of the space until a future time. This option is useful if you have long-running queries that might span the operation and attempt to read from blocks that have been reclaimed. The defragmentation and compaction results are saved to disk, so the data movement does not have to be redone during the second phase. You can reissue the SHRINK SPACE clause without the COMPACT clause during off-peak hours to complete the second phase.