我试图找出为什么我的cypher查询运行得如此慢(只有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我做错什么了吗?
我使用的neoid是基于neography gem的
发布于 2013-06-12 15:13:54
试试这个查询怎么样?
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_idhttps://stackoverflow.com/questions/15228545
复制相似问题