Oracle Internal之Block Cleanout

Oracle Internal之Block Cleanout 1

为什么会有Block Cleanouts? Oracle server在执行一个交易

(transaction)时会保存交易数据在数据块(data block)本身,并且一个交

易有可能修改大量的数据块,因此交易需要清理这些在数据块自己上的交易

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

你可能感兴趣的:(oracle)