知识卡片

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

先重平衡再分裂

理解等级:中级

某页插入将溢出时,若邻页有空间,可以搬一部分记录到邻页;删除后的空页也可向邻页借入元素。搬迁改变两个页的边界,要更新父页的分隔键和子引用。B* 树等相邻页同时满才把两个节点拆为三个,目标占用约三分之二,以更多跨页协调换更高利用率及更小树高。

这张卡片看不懂?

已有反馈 · 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#btree_rebalancing,段 68) - 结论依据:原文用 B* 树二拆三说明提高占用,前后分别给出插删借位和父页更新。 - 原始内容:B*-Trees keep distributing data between the neighboring nodes until both siblings are full [KNUTH98]. Then, instead of splitting a single node into two half-empty ones, the algorithm splits two nodes into three nodes, each of which is two-thirds full.