|
回复 #21 Yong Huang 的帖子
hi,Yong Huang
Your test is very clear,and can directly prove it...
and I found an interesting phenomenon in it,when i did a little changing.
...created a tablespace with blocksize 4k...
SQL> create table t (x char(2000));
表已创建。
SQL> create index ind_t on t (x);
索引已创建。
SQL> insert into t values ('a');
已创建 1 行。
SQL> insert into t values ('b');
已创建 1 行。
SQL> insert into t values ('c');
已创建 1 行。
SQL> analyze index ind_t validate structure;
索引已分析
SQL> select lf_blks,br_blks,btree_space from index_stats;
LF_BLKS BR_BLKS BTREE_SPACE
---------- ---------- -----------
3 1 15648
SQL> delete from t;
已删除3行。
SQL> select lf_blks,br_blks,btree_space from index_stats;
LF_BLKS BR_BLKS BTREE_SPACE
---------- ---------- -----------
3 1 15648
——>I did not do analyzing at this point
——>so the space in the leaf block can not be reused in the same transaction.
SQL> insert into t values ('d');
已创建 1 行。
SQL> insert into t values ('e');
已创建 1 行。
SQL> insert into t values ('f');
已创建 1 行。
SQL> analyze index ind_t validate structure;
索引已分析
SQL> select lf_blks,br_blks,btree_space from index_stats;
LF_BLKS BR_BLKS BTREE_SPACE
---------- ---------- -----------
6 1 27360 ——>the num of leaf block is 6,it directly proves the space in the leaf block is not reused.
freas
junior |
|