索引为什么比其所对应的表大

翻了一下pub上面2002年的老帖子

Index growth could be due to the manner in which Oracle splits the blocks as the index is populated. Indexes are created as b*trees. The only balancing occurs as a 50:50 block splits. Each leaf block is allocated a range of key values. When a value is deleted the space is not immediately available for any new key values - only for ones that fall in the existing range for the block. A block is only placed back on the free list when all the index entries for that block are deleted. "deleted" means that the space is available for reuse but the data is not zeroed out. When a new value is inserted, if the key "fits" into an existing leaf block then it will attempt to place it in that block. This algorithm is not particularly aggressive. When a block split is required it will split the data in the first block 50-50. Half of the data will be kept in the original block and the other half placed in the new (split) block. This algorithm causes the index growth observed and can double the size of the index overtime.

索引保存了 : 键值 + rowid + 树结构
删除后的数据不会立即可用 , 如果新插入的数据跟以前的数据的索引键值一样的话,则会使用原来的空间 .

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-980985/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-980985/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值