知识卡片

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

槽偏移与键序可分离

理解等级:中级

让实际数据往页尾追加,页首的索引项按键重新排列。先插 Tom 再插 Leslie 时可以不用挪动 Tom 的字节;加 Ron 时只在 Leslie 和 Tom 之间插入一个偏移项。二分按该偏移次序读键,避免随每次乱序插入移动整条记录。稳定槽引用另需遵守其映射契约。

参见 [[槽页怎样保持引用]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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#idm46104533132456,段 107) - 结论依据:原文明确说记录可乱序插入,排序的是单元偏移,随后演示三个姓名。 - 原始内容:Keys can be inserted out of order and their logical sorted order is kept by sorting cell offset pointers in key order. This design allows appending cells to the page with minimal effort, since cells don’t