Which of the following options describes Segment Shrink?

Which of the following options describes Segment Shrink?

Which of the following options describes Segment Shrink?

A.
Reclaims space above and below the high-water mark without using additional space

B.
Moves rows to a new physical location, resetting the high-water mark, but uses additional
space during the operation

C.
Deallocates space above the high-water mark that is currently not in use

D.
None of the above



Leave a Reply 4

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


Jake from SF

Jake from SF

B is the correct answer:

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

Segment shrink requires that rows be moved to new locations. Therefore, you must first enable row movement in the object you want to shrink and disable any rowid-based triggers defined on the object. You enable row movement in a table with the ALTER TABLE … ENABLE ROW MOVEMENT command.

Objects with fragmented free space can result in much wasted space, and can impact database performance. The preferred way to defragment and reclaim this space is to perform an online segment shrink. This process consolidates fragmented free space below the high water mark and compacts the segment. After compaction, the high water mark is moved, resulting in new free space above the high water mark. That space above the high water mark is then deallocated. The segment remains available for queries and DML during most of the operation, and no extra disk space need be allocated.

M2

M2

D is the correct answer:

A is incorrect, as space above the HWM is not reclaimed
B is incorrect, as no additional (disk) space is needed
C is incorrect, as space above the HWM is not touched

M2

M2

Sorry, I was wrong: A is the correct answer.
Segment shrink reclaims also space above the HWM (I tested it).
And the rows are moved within the segment, so no additional space is needed, which makes C incorrect.

JohnthePicasso

JohnthePicasso

Answer A is actually correct.