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

查看:747
本文介绍了了解Neo4j Cypher 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天全站免登陆