read consistent process

the process for oracle read data block

[@more@]

■ User 1 updates a record in block 777 (user1 has not committed).

■ User 2 queries the same block and sees that the lock byte is set for a row being queried.

■ User 2 goes to the ITL portion of the block and get the XID (transaction ID).

■ The XID maps to the UNDO block, which holds the information before the update was done.

■ A clone of the block is done (call it block 778).

■ The UNDO information is applied to the block, rolling it forward, but to where it used to be (versus how most people think of it—rolling it back).

■ Block 777 is a CURRENT block.

■ Block 778 is a CONSISTENT READ block before the User 1 update occurred.

■ If another user wants to do a query before the commit, that user can also read the CR version.

请使用浏览器的分享功能分享到微信等