← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10295.a.2.a.1.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#sibling_links,段 13) - 结论依据:原文以非右端页分裂为例说明更新相邻页的反向链接和锁成本。 - 原始内容:Some implementations store forward and backward links, pointing to the left and right sibling pages. These links help to locate neighboring nodes without having to ascend back to the parent.