从DUMP信息中可以看到,第一个L1的第一个块168号块,也是这个段的第一个块的地址。
0:Metadata 1:Metadata 2:Metadata这三个对应的是168号块L1,169号块L2,170号块是段头--第一个L3。
高水位是在176号块,也就是第二个区的第一个块,这里因为一个区只有8个块,一个L1管理了两个区。
插入一行数据,从以上DUMP信息中可以看到,只格式化了高水位下的这个区。区中有三个是存放ASSM的管理信息,所以事实上能用的块是55个块,也就是这次插入数据格式化了5个块。。
注:在其它实验中,插入一行数据格式的数据块个数是不固定的,有过16个,32个,64个等。
插入一行数据格式化的数据块数量应该是和区大小以及高水位位置有一定关系吧,总之格式化数据块是按批进行的,具体一批是多少不清楚哈哈。
#######################3现在使用下面脚本同时启动30个会话进行插入数据操作,然后查看插入的ROWID信息:
结果是;从查询中可以看到,插入的数据块都在高水位176这个数据块之下,被随机插入到了各个块中。
[oracle@bys3 ~]$ cat insert.sql
sqlplus bys/bys <commit;
exec dbms_lock.sleep(2000);
EOF
#######
./insert.sql 1 &
./insert.sql 2 &
./insert.sql 3 &
./insert.sql 4 &
./insert.sql 5 &
./insert.sql 6 &
./insert.sql 7 &
./insert.sql 8 &
./insert.sql 9 &
./insert.sql 10 &
./insert.sql 11 &
./insert.sql 12 &
./insert.sql 13 &
./insert.sql 14 &
./insert.sql 15 &
./insert.sql 16 &
./insert.sql 17 &
./insert.sql 18 &
./insert.sql 19 &
./insert.sql 20 &
./insert.sql 21 &
./insert.sql 22 &
./insert.sql 23 &
./insert.sql 24 &
./insert.sql 25 &
./insert.sql 26 &
./insert.sql 27 &
./insert.sql 28 &
./insert.sql 29 &
./insert.sql 30 &
####################插入完成后查询:
BYS@ bys3>select dbms_rowid.ROWID_RELATIVE_FNO(rowid) fno,dbms_rowid.rowid_block_number(rowid) block#,aa,bb from test11 order by block#;
FNO BLOCK# AA BB
---------- ---------- ---------- ----------
4 171 99 first
4 171 1 hello
4 171 1 hello
4 171 4 hello
4 171 14 hello
4 171 18 hello
4 171 21 hello
4 171 26 hello
4 172 1 hello
4 172 12 hello
4 172 11 hello
4 172 19 hello
4 172 24 hello
4 172 28 hello
4 173 8 hello
4 173 29 hello
4 173 25 hello
4 173 13 hello
4 173 15 hello
4 174 27 hello
4 174 16 hello
4 174 6 hello
4 174 7 hello
4 174 2 hello
4 175 9 hello
4 175 5 hello
4 175 17 hello
4 175 22 hello
4 175 23 hello
4 175 3 hello
从查询中可以看到,插入的数据块都在高水位176这个数据块之下,被随机插入到了各个块中。