另外,在serialiazable方式下,由于一个事务开始前为了防止ORA-08177,必须确定它要修改的数据没有其他事务可能更改,这里有这个判断,所以在oracle的数据块中保留着 这一部分控制信息,表明数据块中的行的提交和未提交的信息,大小是在create table或者alter table的INITRANS参数,在某些情况下,频繁的对块中的行进行事务操作,导致
oracle缺少足够的控制信息来判断该块上的行的最近访问情况,从而出现错误,避免的方法就是增打INITRANS参数。见联机文档:
Serializable isolation permits concurrent transactions to make only those database
changes they could have made if the transactions had been scheduled to run one after
another. Specifically, Oracle permits a serializable transaction to modify a data row
only if it can determine that prior changes to the row were made by transactions that
had committed when the serializable transaction began.
To make this determination efficiently, Oracle uses control information stored in the
data block that indicates which rows in the block contain committed and uncommitted
changes. In a sense, the block contains a recent history of transactions that affected
each row in the block. The amount of history that is retained is controlled by the
INITRANS parameter of CREATE TABLE and ALTER TABLE.
Under some circumstances, Oracle can have insufficient history information to
determine whether a row has been updated by a too recent transaction. This can occur
when many transactions concurrently modify the same data block, or do so in a very
short period. You can avoid this situation by setting higher values of INITRANS for
tables that will experience many transactions updating the same blocks. Doing so
enables Oracle to allocate sufficient storage in each block to record the history of recent
transactions that accessed the block.