oracle的声音:

This can happen because the Oracle database presents the user with a consistent view of the data as it exists at the time the query starts running. If there are uncommitted changes to the table being queried, the Oracle database reads the undo data to get the committed version of data. This is read consistency. If the query runs so long that in the meantime those modifications are indeed committed, and subsequently their undo data is released and overwritten, then the long-running query no longer can see a consistent view of the data as of when it first began to run. For this reason, undo retention should be configured to accommodate the longest-running query.

解释:当用户要修改一个表时,oracle会把修改记录的旧值放在undo段中,这就是读一致性。当一个查询要访问该记录时,会被定位到undo段中获取值,当这个查询很长,而那个修改的操作已经提交,对应的undo段被回收或重写了,这个查询语句就会报ORA-01555: snapshot too old(快照太旧”)错误。