initrans和maxtrans

tolywang發表於2007-10-19
下面是個測試方法
The interested transaction list is an array that keeps track of (some of) the most recent transactions on a block. The size of this array is specified by the initrans parameter when an object is created. If more entries are needed in the ITL and if there is enough space in the block, the array can grow up to maxtrans.
This can be demonstrated with 3 sessions:
First session;

create table t_ (a number) initrans 1 maxtrans 2;
insert into t_ values (1);
insert into t_ values (2);
insert into t_ values (3);
;

update t_ set a = 101 where a = 1;
Second session:
update t_ set a = 102 where a = 2;
Third session:
update t_ set a = 103 where a = 3;
This third session hangs until one of the other session commits or rolls back.

oracle預設initrans就是2,maxtrans是255;initrans可以單獨設,maxtrans是要和initrans引數是要同時用的,否則設不成功
10g的maxtrans預設就是255。
select table_name,ini_trans,max_trans from user_tables where table_name ='TNAME'
可看到設定情況

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-84961/,如需轉載,請註明出處,否則將追究法律責任。

相關文章