知识卡片

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

磁盘树需要高扇出

理解等级:中级

磁盘数据按页读取;若二叉树的每一跳都落到不同页,即使只比较对数次,也需要对数次页寻址。把多个分隔键和其子页地址放进同一页,提高扇出,让一次页读取排除更多范围。树更矮,修改时需要搬动页和重写跨页指针的机会也变少。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 2. B-Tree Basics(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch02.html#trees_for_disk_based_storage,段 25) - 结论依据:原文以二叉树的两路扇出和每层磁盘寻址推导低扇出的代价。 - 原始内容:Another problem, closely related to the cost of following child pointers, is tree height. Since binary trees have a fanout of just two, height is a binary logarithm of the number of the elements in the