知识卡片
B加树的页层级
B+ 树内部页存有序分隔键与子页引用,若有 N 个分隔键就分出 N+1 段。顶层根给出粗分范围,内部页逐层缩小范围,叶页存实际记录或记录定位信息。普通记录修改只需改叶;叶满或使用率过低时,分裂和合并才可能改变更高层。内部页节省值占用的空间也有利于维持高扇出。
结构图:
flowchart TB
R[根页:分隔范围] --> I1[内部页:细分范围]
R --> I2[内部页:细分范围]
I1 --> A[叶页:键和值]
I2 --> B[叶页:键和值]
A -. 兄弟引用 .-> B
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 2. B-Tree Basics Ubiquitous B-Trees · 查看原书依据
B-Trees allow storing values on any level: in root, internal, and leaf nodes. B+-Trees store values only in leaf nodes. Internal nodes store only separator keys used to guide the search algorithm to the associated value stored on the leaf level.
参考来源
- 位置:《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#idm46104533466776,段 86)
- 结论依据:原文对照可在任意层存值的 B 树与只在叶层存值的 B+ 树。
- 原始内容:B-Trees allow storing values on any level: in root, internal, and leaf nodes. B+-Trees store values only in leaf nodes. Internal nodes store only separator keys used to guide the search algorithm to the associated value stored on the leaf level.