开发者

Why are overflow blocks in a database not binary searchable?

This is related to primary database indexing mechanism (sparse indexi开发者_JS百科ng).

Binary search can be used on the index file to locate an entry. But, if overflow blocks have been used, binary search will not be possible.

Could someone explain how overflow blocks make binary search not possible to use?


Overflow blocks are created when there is insufficient space in an indexed block to create a new record.

Overflow blocks cannot be binary searched because they are not part of the primary indexing/linked list scheme (i.e. not binary indexed). Instead, they are attached to (associated with) primary blocks that are part of the indexing scheme.

To get to them, you have to do a binary search to find the closest index block, and then search through the overflow blocks sequentially to find the one you want.

If you wish, you can index the overflow blocks to make them first-class citizens (part of the binary search), but then they are not overflow blocks anymore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜