Oracle Internal之Block Cleanout 1
为什么会有Block Cleanouts? Oracle server在执行一个交易
(transaction)时会保存交易数据在数据块(data block)本身,并且一个交
易有可能修改大量的数据块,因此交易需要清理这些在数据块自己上的交易
数据当一个交易完成commit。
那些东西需要cleaned out?
1. Row Locks
2. ITL Entry:
- Commit flags
- Free Space Credit/Commit SCN
Deferred Block Cleanout:
A transaction commit was a simple update to the relevant undo
segment header.
The data block cleanout was left to the next reader of the
modified block
Fast Block Cleanout: This is the default action.
Modified blocks are 'memorized' by a transaction. On
transaction commit, cleanout is attempted on those blocks in
memory(up to a limit 20 blocks). For any blocks above this
threshold, or aged out of memory, or currently pinned by another
process deferred block cleanout will be still used.
Oracle Internal之Block Cleanout: Commit Cleanout
一个交易commit后需要做fast block cleanout,但一个交易有可能更新多
个数据块,因此这个交易必须要记得那些block做过修改。 Oracle使用了一
个叫做Block List State Object来完成这个记住这些修改过的数据块。
这个BL State Object包含最多20不同的数据块的条目,每个BL State
Object条目包含如下信息:
. 当前TX的Savepoint number
. 当前TX的ITL索引
. 相关数据块的块头的指针
当修改一个数据块时,TX将这个块的如上信息加入到BL State Object。
The maximum number of blocks "remembered" is effectively 10% of
current #buffer rounded to the nearest multiple of 2
为什么会有Block Cleanouts? Oracle server在执行一个交易
(transaction)时会保存交易数据在数据块(data block)本身,并且一个交
易有可能修改大量的数据块,因此交易需要清理这些在数据块自己上的交易
数据当一个交易完成commit。
那些东西需要cleaned out?
Deferred Block Cleanout:
segment header.
modified block
Fast Block Cleanout: This is the default action.
transaction commit, cleanout is attempted on those blocks in
memory(up to a limit 20 blocks). For any blocks above this
threshold, or aged out of memory, or currently pinned by another
process deferred block cleanout will be still used.
Oracle Internal之Block Cleanout: Commit Cleanout
一个交易commit后需要做fast block cleanout,但一个交易有可能更新多
个数据块,因此这个交易必须要记得那些block做过修改。 Oracle使用了一
个叫做Block List State Object来完成这个记住这些修改过的数据块。
这个BL State Object包含最多20不同的数据块的条目,每个BL State
Object条目包含如下信息:
当修改一个数据块时,TX将这个块的如上信息加入到BL State Object。
The maximum number of blocks "remembered" is effectively 10% of
current #buffer rounded to the nearest multiple of 2