← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10295.a.1.a.4.a.2.a · 生成模型:未记录

按有序槽做页内二分

理解等级:中级

页中的记录单元可以按插入顺序放置;二分搜索只需要顺序目录按键排列。每一步先用下标取中间槽的偏移,按偏移读到记录键,与目标比较并缩小下标区间。叶上找到等值即可读出记录,未找到可返回有序插入位置;内部页用第一个严格大于目标的分隔键决定下一跳。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 4. Implementing B-Trees(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch04.html#idm46104532910552,段 50) - 结论依据:原文按取中间偏移、跟随偏移、比较、缩短范围的顺序解释间接二分。 - 原始内容:Cells in the B-Tree page are stored in the insertion order, and only cell offsets preserve the logical element order. To perform binary search through page cells, we pick the middle cell offset, follow its pointer