|
|
我们再来看 scn: 0x0000.000982e6 seq: 0x05 中的 seq
sequence 1 byte
A sequence number incremented for each change to a block at the same SCN. A new SCN is allocated if the sequence number wraps.
1 byte 的seq 最多可以记录 256次改变,也就是当同一个事务对同一个块改变超过256次的时候会产生一个SCN,如下测试
SQL> select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
MAX(KTUXESCNW*POWER(2,32)+KTUXESCNB)
------------------------------------
25699384
SQL> begin
2 for i in 1..10 loop
3 update rainy.itl set a = 0 where rownum = 1;
4 update rainy.itl set a = 1 where rownum = 1;
5 end loop;
6 commit;
7 end;
8 /
PL/SQL 过程已成功完成。
SQL> select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
MAX(KTUXESCNW*POWER(2,32)+KTUXESCNB)
------------------------------------
25699386
SQL> begin
2 for i in 1..1000 loop
3 update rainy.itl set a = 0 where rownum = 1;
4 update rainy.itl set a = 1 where rownum = 1;
5 end loop;
6 commit;
7 end;
8 /
PL/SQL 过程已成功完成。
SQL> select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
MAX(KTUXESCNW*POWER(2,32)+KTUXESCNB)
------------------------------------
25699403
SQL> |
|