为什么kd-tree是主存储器结构? [英] Why is the kd-tree a main memory structure?

查看:197
本文介绍了为什么kd-tree是主存储器结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道为什么kd-tree总是被视为主存储器结构。这意味着每个节点都保存在主内存中,不是吗?

I'm just wondering why the kd-tree is always considered as a main memory structure. This means that every node is kept in main memory, doesn't it?

与B树(每个节点应该放入一个磁盘块)相比,这不是对我来说太有意义了。有人可以解释一下吗?谢谢:)

Compared to B-trees (where every node should fit into one disk block), this doesn't make too much sense to me. Could anyone explain that? Thanks :)

推荐答案

要有效地将树存储在磁盘上,它应该适合8k页(大多数硬盘的页面大小) )。使用kd-tree这将是巨大的浪费,而且效率非常低。

To efficiently store the tree on the disk, it should fit into 8k pages (the page size of most harddrives). With a k-d-tree this would be enormous waste, and very inefficient.

因此,将kd-tree写入磁盘并不会有所回报。

Thus, writing the k-d-tree to disk doesn't pay off.

另一方面,可以设置B树,以便它们使用整个磁盘页面。
这很重要,因为磁盘在访问块时更有效(甚至更好:块的范围),而不是在随机访问字节时。

B-trees on the other hand can be set up so that they use the whole disk page. This is important, because disks are more efficient when accessing blocks (or even better: ranges of blocks), not when randomly accessing bytes.

这篇关于为什么kd-tree是主存储器结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆