一切都应该与neo4j中的节点0连接吗 [英] should everything connect with node 0 in neo4j

查看:81
本文介绍了一切都应该与neo4j中的节点0连接吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在neo4j中,是否所有节点都应连接到节点0,以便您可以创建跨所有对象的遍历?大型数据集会带来性能问题吗?如果是这样,那么多少个节点太多呢?如果现在我没有看到用例,假设我使用索引来查找特定节点,可以不将节点连接到节点0吗?

In neo4j should all nodes connect to node 0 so that you can create a traversal that spans across all objects? Is that a performance problem when you get to large datasets? If so, how many nodes is too much? Is it ok not to have nodes connect to node 0 if I don't see a use case for it now, assuming I use indexes for finding specific nodes?

推荐答案

无需将所有内容都连接到根节点.索引可以很好地找到遍历的起点.如果说连接到起始节点(如根节点)的节点少于5000个,那么关系扫描比索引查找便宜.

There is no need or requirement to connect everything to the root node. Indexes work great in finding starting points for your traversal. If you have say less then 5000 nodes connected to a starting node (like the root node), then a relationship scan is cheaper than an index lookup.

要判断哪个更好,您需要对域有更多了解.

To judge what is better, you need to know a bit more about the domain.

这篇关于一切都应该与neo4j中的节点0连接吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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