繁体   English   中英

慢Neo4j密码查询

[英]slow neo4j cypher query

我试图找出为什么我的密码查询运行这么慢(仅5000个节点需要2-5秒)。 该查询正在尝试查找个人资料可以在其网络内到达的所有工作(他的朋友或朋友的朋友在同一公司工作的工作)

这是查询:

Start current_profile= node:node_auto_index(neoid_unique_id = "Profile:1")
 Match current_profile-[r:friendships*0..2]->friends-[:roles]->company-[:positions]->jobs
 return distinct company.fmj_id

我尝试精简查询以查看我在做什么错,甚至这个简单的查询也花费了太长时间:

START root=node(0)
Match root-[:job_subref]->j-[:jobs]->jobss
return jobss

我做错什么了吗?

我正在使用基于neography宝石的neoid

尝试这个查询呢

Start current_profile= node:node_auto_index(neoid_unique_id = "Profile:1")
Match current_profile-[r:friendships*0..2]->friends
WITH friends
friends-[:roles]->company-[:positions]->jobs
RETURN company.fmj_id

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM