知识卡片
页号与单元偏移
树指向子页时记录页号,由页管理器映射到文件中的实际起点;页内单元用相对页起点的偏移,所需表示范围更小。内部键单元可由键长、子页号和键字节组成,叶单元则存键长、值长和两段字节。固定字段先置可让解码器直接取长度与引用,共有的类型和宽度可移到页头。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 3. File Formats Cell Layout · 查看原书依据
You might have noticed the distinction between the offset and page ID here. Since pages have a fixed size and are managed by the page cache (see “Buffer Management”), we only need to store the page
参考来源
- 位置:《Database Internals》Chapter 3. File Formats(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch03.html#idm46104533163752,段 99)
- 结论依据:原文区分页号与页内偏移,还给出两类单元及变长数据的定位公式。
- 原始内容:You might have noticed the distinction between the offset and page ID here. Since pages have a fixed size and are managed by the page cache (see “Buffer Management”), we only need to store the page