Neo4j标签性能

时间:2013-09-25 12:56:11

标签: performance neo4j

类似组中共享标签的使用如何影响彼此的性能?广泛使用的标签会对使用它作为超组定义的小组产生多大影响?

1 个答案:

答案 0 :(得分:0)

我最终填充了一个小数据库来测试标记组的大小差异会影响彼此的性能。结果是,您可以自由地使用任意数量的标签而不会对性能产生任何重大影响,前提是在此方案中您可以从更具体到更通用的方式指定它们:

neo4j-sh (?)$ match n:Test return count(n);
==> +----------+
==> | count(n) |
==> +----------+
==> | 189222   |
==> +----------+
==> 1 row
==> 1571 ms

neo4j-sh (?)$ match n:Test:One return count(n);
==> +----------+
==> | count(n) |
==> +----------+
==> | 170216   |
==> +----------+
==> 1 row
==> 1534 ms

neo4j-sh (?)$ match n:Test:Two return count(n);
==> +----------+
==> | count(n) |
==> +----------+
==> | 19006    |
==> +----------+
==> 1 row
==> 526 ms

neo4j-sh (?)$ match n:TestTwo return count(n);
==> +----------+
==> | count(n) |
==> +----------+
==> | 19082    |
==> +----------+
==> 1 row
==> 329 ms

neo4j-sh (?)$ match n:Two:Test return count(n);
==> +----------+
==> | count(n) |
==> +----------+
==> | 19006    |
==> +----------+
==> 1 row
==> 306 ms

(显示的执行时间是多个查询的平均值)