很大的表。
SHRINK TABLE确实要花费UNDO 。
但是我没看到哪里说SHRINK就是INSERT DELETE噢,只是说compaction阶段会把数据分为小的包进行操作,
避免大面积的堵塞。但是降低HWM的时候就是全表加X锁了。
所以,分两部做看看。如果真的时UNDO不够那就没办法了,只有加。
大表分分区嘛。这样操作耗用UNDO少点。。呵呵
文档
The compaction phase of a segment shrink operation is done online. So, conventional DML operations as well as queries can coexist with a segment shrink operation.
During the compaction phase, locks are held on individual rows containing the data. This causes concurrent DML operations such as updates and deletes to serialize on these locks. However, only packets of rows are locked at one time to avoid the locking of the entire segment.
Similarly, conventional DML operations can block the progress of the compaction phase until they commit.
The COMPACT clause is useful if you have long-running queries that might span the shrink operation and attempt to read from blocks that have been reclaimed. When you specify the SHRINK SPACE COMPACT clause, the progress of the shrink operation is saved in the bitmap blocks of the corresponding segment. This means that the next time a shrink operation is executed on the same segment, the Oracle database remembers what has been done already. You can then reissue the SHRINK SPACE clause without the COMPACT clause during off-peak hours to complete the second phase.
During the second phase of the segment shrink operation, when the HWM is adjusted, the object is locked in exclusive mode. This phase is for a very short duration and does not affect the availability of the segment significantly. However, dependent cursors are invalidated.