oracle 实例表空间不足,shrink space遇到UNDO_TABLESPACE表空间不足现象

很大的表。

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.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值