Oracle #DB12c New – TEMP_UNDO_ENABLED

ManyThingsOracle-pic1Global temporary table data is stored in the temporary tablespace (where no redo will be generated on the DML operations). When DML operations are performed on global temporary table, for read consistency undo must be generated. Such undo records are written to undo tablespace, and thus redo generated on the undo writes.

If you perform large amounts of DML on temporary tables data, you can reduce the amount of reManyThingsOracle-pic2do generated from undo operations by having Oracle use two undo streams. By setting the TEMP_UNDO_ENABLED to TRUE, a transaction splits the undo – the undo on the persistent tables will be written to the undo tablespace and undo on temporary tables will be written to temporary tablespace.

The parameter can be set at system level or changed at session level. Once a session started using either persistent undo area or temporary undo area (based on the value of TEMP_UNDO_ENABLED) for temporary tables for the first time, changing the value of the parameter will not have no effect – no errors will be shown. So, if you want to enable temporary undo for a session, make sure you enable before doing any temporary table DML operations. This may be a parameter you set at instance level and not worry about enabling at session level.