关于undo_retention

意思是commit之后在undo中需要保留的时间,以秒为单位,主要是应对long query
如果query发生在修改之前,此时可能需要通过undo来构造一致性读取,如果读不到,就报ora-01555

Oracle uses the undo blocks within a undo segment in a circular fashion.
If oracle run out of undo blocks in a specific extent, it will move to the next extent.
At this time,

(1) If the next extent has an active transaction, them Oracle will not move to this extent (Oracle will not skip over this extent because the circular fashion)
      a) extend the segment by adding a new extent if the undo tablespace is autoextend
      b)can not extend the segment, ORA-01562

(2)If there is no active transaction in the next extent

      a) if this extent committed less than undo_retention seconds
          - if there is enough space in the undo tablespace, Oracle will adding a new extent
          - if there is no space in the undo tablespace, Oracle will overwrite the committed undo blocks, so if some query
            is  using  this committed blocks to construct the consistent image, then ORA-01555

      b)if this extent committed more than undo_retention seconds
         - overwrite this extent

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12361284/viewspace-620165/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12361284/viewspace-620165/

你可能感兴趣的:(关于undo_retention)