了解 Neo4j Cypher Profile 关键字和执行计划 [英] Understanding Neo4j Cypher Profile keyword and execution plan

查看:13
本文介绍了了解 Neo4j Cypher Profile 关键字和执行计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释或提供链接,我们可以在其中了解 profile 命令并了解 Cypher 查询的执行计划以优化需求并了解 Cypher 的工作原理.

Could someone please explain or provide links where we can learn about the profile command and understand the execution plans of Cypher query for optimization needs and understanding how Cypher works.

例如,我创建了以下 Neo4j(2.0 版)示例数据库.

For example, I created the following Neo4j(version 2.0) sample database.

create (ayan:Person{name:"Ayan",age:25}), 
(dixi:Person{name:"Dixi",age:26}), 
(thaggu:Person{name:"Thaggu",age:27}), 
(santosh:Person{name:"Santosh",age:28}),
(ayan)-[:FRIEND]-(santosh),
(ayan)-[:FRIEND]-(dixi),
(thaggu)-[:FRIEND]-(dixi);

现在,当我运行下面的简单查询时,

Now,when i run the simple query below,

profile match n:Person, n-[:FRIEND]-m where n.name="Ayan" return m;

我得到以下结果,但我无法理解结果下面的解释.请帮忙.

I get the following result, but I am not able to understand the explaination below the result. Please help.

+--------------------------------+
| m                              |
+--------------------------------+
| Node[4]{age:28,name:"Santosh"} |
| Node[2]{age:26,name:"Dixi"}    |
+--------------------------------+
2 rows



==> ColumnFilter(symKeys=["n", "m", "  UNNAMED17"], returnItemNames=["m"], _rows=2, _db_hits=0)

==> PatternMatch(g="(m)-['  UNNAMED17']-(n)", _rows=2, _db_hits=0)

==>   Filter(pred="(Property == Literal(Ayan) AND hasLabel(n: Person))", _rows=1, _db_hits=4)

==>     NodeByLabel(label="Person", identifier="n", _rows=4, _db_hits=0)

推荐答案

个人资料信息目前还没有完成,因此没有记录.然而,关键的数字是_db_hits 不应该特别高,因为它们很昂贵.

the profile information is right now not finished yet and therefore not documented. However, the critical number are the _db_hits that should not be exceptionally high since they are expensive.

这篇关于了解 Neo4j Cypher Profile 关键字和执行计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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