Database Reference
In-Depth Information
Odd Groups (1,3,5)
Even Groups (2,4,6)
Archive Logs
Before Log Switch
After Log Switch
ARCH
LGWR
ARCH
LGWR
Disk 5
Disk 5
Disk 1
Disk 2
Disk 1
Disk 2
Disk 6
Disk 6
Disk 3
Disk 4
Disk 3
Disk 4
Figure 9-6. Redo log flow
So, when LGWR is writing group 1, ARCn is reading group 2 and writing to the archive disks. When LGWR is writing
group 2, ARCn is reading group 1 and writing to the archive disks. In this fashion, LGWR and ARCn each have their own
dedicated devices and will not be contending with anyone, not even each other.
Temporary Tables and Redo/Undo
Temporary tables have been a feature within Oracle for several releases now (introduced in Oracle8 i version 8.1.5).
Even though temporary tables have been around for a while, there is still some confusion surrounding them, in
particular in the area of logging. In Chapter 10, we will cover how and why you might use temporary tables. In this
section, we'll explore only the question “How do temporary tables work with respect to logging of changes?”
In Oracle 12c, the processing of undo for temporary tables is significantly enhanced. Therefore I'll break this topic
into two sections: Prior to 12c and Starting with 12c.
Prior to 12c
Temporary tables generate no redo for their blocks. Therefore, an operation on a temporary table is not recoverable.
When you modify a block in a temporary table, no record of this change will be made in the redo log files. However,
temporary tables do generate undo, and the undo is logged . Hence, temporary tables will generate some redo. At first
glance, this doesn't seem to make total sense: Why would they need to generate undo? This is because you can roll
back to a SAVEPOINT within a transaction. You might erase the last 50 INSERT s into a temporary table, leaving the first
50. Temporary tables can have constraints and everything else a normal table can have. They might fail a statement on
the five-hundredth row of a 500-row INSERT , necessitating a rollback of that statement. Since temporary tables behave
in general just like normal tables, temporary tables must generate undo. Since undo data must be logged, temporary
tables will generate some redo log for the undo they generate.
 
 
Search WWH ::




Custom Search