|
> 在索引存在的条件下,为什末不会产生呢?
Here's some interesting finding. I can reproduce it in RAC (mine is 10.2.0.4). I cannot reproduce it in single-instance, non-RAC databases (I tested in 10.2.0.4 and 10.2.0.3). In fact, the update with or without an index doesn't make any difference. Neither created a CR block for the *data* block in non-RAC (although one CR for the second BMB block and one CR for the segment header were created).
For others interested in this discussion, here's a step-by-step procedure to reproduce.
create table testcr (x int);
select header_file, header_block from dba_segments where segment_name = 'TESTCR' and owner = user;
--and I got 4 and 22179. Since tablespace is ASSM, I check 2 BMB blocks, header block, and the data block. The BMB and header blocks don't have to be checked but since just_dba claims he saw CR created for the segment header, I'd like to see that really can happen.
select block#, status from v$bh where file# = 4 and block# between 22177 and 22180 order by 1;
--should show 2 BMB blocks and 1 header block, all with xcur status
insert into testcr values (1);
select block#, status from v$bh where file# = 4 and block# between 22177 and 22180 order by 1;
--should show one more row for data block in xcur status
update testcr set x = 1;
select block#, status from v$bh where file# = 4 and block# between 22177 and 22180 order by 1;
--should show one CR created for the data block in RAC, but no new block in non-RAC
create index testcr_i on testcr (x);
update testcr set x = 1;
select block#, status from v$bh where file# = 4 and block# between 22177 and 22180 order by 1;
--should show one more CR created (RAC only)
update testcr set x = 1;
select block#, status from v$bh where file# = 4 and block# between 22177 and 22180 order by 1;
--should show no new CR created
The last step showing no new CR created is what ccsnmoracle asks. Please let me know if your DB is RAC. I suggest ccsnmoracle opens an SR with Oracle to find a good answer.
Yong Huang
[ 本帖最后由 Yong Huang 于 2010-6-28 13:03 编辑 ] |
|