知识卡片
磁盘树需要高扇出
磁盘数据按页读取;若二叉树的每一跳都落到不同页,即使只比较对数次,也需要对数次页寻址。把多个分隔键和其子页地址放进同一页,提高扇出,让一次页读取排除更多范围。树更矮,修改时需要搬动页和重写跨页指针的机会也变少。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 2. B-Tree Basics Trees for Disk-Based Storage · 查看原书依据
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
参考来源
- 位置:《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