6

暗号クエリの実行が非常に遅い理由を見つけようとしています (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 gemに基づいたneoidを使用しています

4

1 に答える 1

2

このクエリを試してみてはどうですか

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
于 2013-06-12T07:13:54.453 に答える