|
Re: 不是吧,我的实验结果怎么会和你说的不一样:
最初由 超级野人 发布
[B]
我的试验:
create table qqq (aaa varchar(10),bbb varchar(10));
insert into qqq values('aaa','bbb');
insert into qqq values('aaa','ccc');
insert into qqq values('aaa','ddd');
insert into qqq values('aaa','eee');
dump结果:
flag=-----------
ntab=1
nrow=4
frre=-1
fsbo=0x1a
fseo=0x1f8c
avsp=0x1f72
tosp=0x1f72
0xe ti[0] nrow=4 offs=0
0x12 ri[0] offs=0x1fad
0x14 ri[1] offs=0x1fa2
0x16 ri[2] offs=0x1f97
0x18 ri[3] offs=0x1f8c
block_row_dump:
。。。。。。。。。。。。。。。。
update qqq set bbb='ppp' where bbb='ccc';
dump结果:
...
位置不是没变么!!!!!!!!!!!!!! [/B]
I must be remembering wrong. Try delete and insert instead of update, like this:
create table t (s varchar2(3));
insert into t values ('aaa');
commit;
Dump the block
delete from t;
commit;
insert into t values ('bbb');
commit;
Dump the block
Then repeat the same test except create table t (s char(3)). I'm not sure if the commits are necessary but they're harmless.
I just did a test on 10.1.0.2.0. It looks like with varchar2, after the second insert, the block actually has 2 rows in row directory; the first row is marked D for deleted (--HDFL--) and only the second has the data, and this second row is 7 bytes closer to the block header. When the data type is char(3), there's just one row all the time.
I think I did a similar or the same test on 8.1.5 originally. Many years ago I had a bad habit of not recording my test and so it's lost in my memory!
Yong Huang |
|