|
原帖由 Yong Huang 于 2011-7-11 23:22 发表 ![]()
I think this is a mis-reading of Tom's writing, which I read before. Note my wording "Space for an index entry". Tom is dismissing the myth about space, *as an entire block*, for that index entry. I wish Tom had pointed it out clearly, and I should've been more specific.
The "subtle" difference is not hard to understand. One block (usually) can contain many index entries. What I said is that if index key 5 is deleted, the space used by value 5, perhaps a few bytes, is not re-used unless 5 is put back. Saying the entire block that used to have 5 will no longer accept new values is of course wrong. If you read Tom's book, the example following his myth dismissal, you'll see that he's talking about the *block* can still be re-used. Unfortunately, in this paragraph here, he used the word "slot". But read his demo anyway.
A good test would be, make sure one index entry takes one whole block, perhaps by setting pctfree very high.
Yong Huang
hi,Yong Huang
"Note my wording "Space for an index entry". Tom is dismissing the myth about space, *as an entire block*, for that index entry. I wish Tom had pointed it out clearly, and I should've been more specific."
There're two mythes in tom's book:
myth one:
The myth states that once an index slot(I think it's not lapsus calami) is used, it will be there forever and can be reused only by the same value.
myth two:
free space is never returned to the index structure, and a block will never be reused.(which is the corollary of myth one)
(I think)Tom thinks that his demo prove that myth two is wrong,so,myth one is indirectly proved to be wrong.
[ 本帖最后由 freas 于 2011-7-12 15:58 编辑 ] |
|