Undo is copy of original, premodified data. Its captured for every transaction that changes data. Capturing undo data enables us to ROLLBACK uncommitted data.Undo supports read consistent and flashback queries. Undo can rewind transactions and tables.Read consistent queries provide results that are consistent with data as of time query started.
For read consistent query to succeed, original information must still exists as undo information.If original data is not available then we receive snapshot too old error.
Reasons behind ORA-01555 Snapshot too old error:
This error occurs due to oracle read consistency mechanism.
Suppose I executed SELECT statement which is taking more than 15 mins to fetch complete rows in one session and performed DML’s on same table which SELECT is fetching data simultaneously with sequential COMMITS in another session.
Now what will happen is SELECT statement will consider data as of timestamp from where it begins execution.
But in another session data has been modified as COMMITS were executed.
Here you will get ORA-01555.
How to configure undo retention? Undo retention parameter specifies how long a committed undo information to be retained.
The only time you set this parameter is when
1.Undo tablespace has AUTOEXTEND option enabled. 2.You want to set UNDO retention for LOBS. 3.You want guarantee retention.