Neo4j删除关系的方向明显需要更多的时间

Neo4j删除关系的方向明显需要更多的时间,neo4j,cypher,Neo4j,Cypher,我有两个查询,它们占用的时间明显不同。在Cypher的人际关系中,有什么我不理解的问题 少于1秒,有5个结果: allshortestpaths((et)-[*]->(st)) 少于1秒,有3个结果: allshortestpaths((et)<-[*]-(st)) 为什么要花很长时间。我假设这只需要返回8个结果 完整的示例查询: profile match (s:Stop)--(st:Stoptime), (e:Stop)--(et:Sto

我有两个查询,它们占用的时间明显不同。在Cypher的人际关系中,有什么我不理解的问题

少于1秒,有5个结果:

allshortestpaths((et)-[*]->(st))
少于1秒,有3个结果:

allshortestpaths((et)<-[*]-(st))
为什么要花很长时间。我假设这只需要返回8个结果

完整的示例查询:

profile match (s:Stop)--(st:Stoptime),     
              (e:Stop)--(et:Stoptime)  
              where s.name IN [ 'Schlump', 'U Schlump']     
              and e.name IN [ 'Hamburg Hbf', 'Hauptbahnhof Nord']         
              match p = allshortestpaths((et)-[*]->(st))      
              return p
使用allshortestpathset-[*]->st,您将拥有如下路径:a->b->c->d

使用allshortestpathset
profile match (s:Stop)--(st:Stoptime),     
              (e:Stop)--(et:Stoptime)  
              where s.name IN [ 'Schlump', 'U Schlump']     
              and e.name IN [ 'Hamburg Hbf', 'Hauptbahnhof Nord']         
              match p = allshortestpaths((et)-[*]->(st))      
              return p