知识卡片
查找的页数与比较数
若有效扇出约为 f、待索引记录数为 M,从根到叶经过的页数是 O(log_f M);叶和上层页是否已缓存决定实际磁盘读。每个页在内存中二分,一页约需 log₂ f 次比较,总比较仍为 O(log₂ M)。计算量级写法可省底数,估算真实读取尤其要关注扇出和缓存。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 2. B-Tree Basics Separator Keys · 查看原书依据
B-Tree lookup complexity can be viewed from two standpoints: the number of block transfers and the number of comparisons done during the lookup.
参考来源
- 位置:《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#b_tree_complexity,段 97)
- 结论依据:原文明确拆分块传输和比较两类成本,随后分别使用扇出和 2 作对数底。
- 原始内容:B-Tree lookup complexity can be viewed from two standpoints: the number of block transfers and the number of comparisons done during the lookup.