如何理解ORA-01555,看MOS:467872.1
延迟块清除:Delayed Block Cleanoutanout
一句话概括,数据库头纪录事务回滚段标记的标志位不会在commit发生时同步更新,一般情况会在下次有人touch这个block时去跟回滚段状态进行匹配验证,如果发现回滚段显示已经提交,此时才更新数据段头纪录。
可以参考:ORA-01555 "Snapshot too old" - Detailed Explanation (Doc ID 40689.1)
EXAMPLE:
Time 1: Session #1 starts a query on table A
Time 2: Session #2 updates row X in table A
Time 3: The query from session #1 arrives at row X and discovers the last updated time
(based on the SCN number) of the row to be later than Time 1 ... so the UNDO or
LOB segments are used to get the read consistent view (before image) of the row
and then the query proceeds
Time 4: Session #2 updates row Y in table A and then COMMITs (thus making it possible
for this transaction slot to be overwritten)
Time 5: Session #2 updates row Z in table B and COMMITs ... either due to space pressure
(using AUM) or bad luck (using rollback) in the read consistent view for the update
of row Y in table A at time 4 ... is overwritten (we wont examine why the overwrite
occurs at this point)
Time 6: The query from session #1 arrives at row Y and and discovers the last updated time
(based on the SCN number) of the row to be later than Time 1 ... so the UNDO or
LOB segments are examined to find the read consistent view ... BUT ... the
transaction slot containing the view ... was overwritten at time 5 ... so no read
consistent view is available ... so an ORA-1555 occurs
NOTE ... UNDO is a generic term that can refer to either UNDO (AUM) or Rollback segments
简单说就是构造一致性读所需的UNDO块被覆盖了。
两个常见原因:
1、 回滚段信息被覆盖,一些版本过旧的block已经无法获取信息。
2、回滚段头的事务槽被覆盖
MOS中有详细的示例。
大概的覆盖过程:

参考:
Explaining ORA-1555 Error (Doc ID 467872.1)
ORA-01555 "Snapshot too old" - Detailed Explanation (Doc ID 40689.1)