Journalling in TD

Database
Enthusiast

Journalling in TD

Hi Forum Gurus,
I was having some doubts regarding transient journal working in TD.I have written what i think is happening with few doubts...please look into it...
I think TD goes for immediate database modification technique in which all operations are written to database and before that log records are written to stable storage(i.e transient journal in FSG cache)

If ti has it will UNDo
If ti has it will redo

Modifications are first done on buffer blocks in memory and afterwards send to database but before that transient journal is written..

Doubts
1)Journalling done on row by row basis or block?
2)delete/update/insert all have same transaction technique or different
as in case of update there is some pre image of row but in case of insert no pre image..
3)
How does journalling take place in case of Fast insert/select........
4)
Delete ALL....is this option really skips journalling?

Any reply will really help all of us in clearing this topic..
Regards,
2 REPLIES
Enthusiast

Re: Journalling in TD


Journal records are created and buffered (but not necessarily written to disk) before the data block is modified.

>> Doubts
>> 1)Journalling done on row by row basis or block?
It may be either, depending on the operation.

>> 2)delete/update/insert all have same transaction technique or different as in case of update there is some pre image of row but in case of insert no pre image..
The journal records contain exactly the information needed to undo or redo the operation, and of course that varies depending on the operation.

>> 3) How does journalling take place in case of Fast insert/select........
If the operation is an insert into an initially empty table, then the undo operation is to reset the table to empty. Thus, a single journal record (on each AMP) is sufficient to protect the entire operation, regardless of how many rows are involved.

>>4) Delete ALL....is this option really skips journalling?
An unconditional delete (regardless of whether ALL is specified in the SQL) may skip row-by-row journaling if it is the last statement in a transaction.

Enthusiast

Re: Journalling in TD

Hi,
Thankx for your reply...
Could you please explain where TD goes for row by row journal and where block by block...
Also what is difference between journal procedure in update/delete and insert........
An example will really help us all beginners...........