0
votes

I intend to find the path between two nodes:

MATCH (x:Column {name:'colA', schema:'a.b'})-[cd:CD*1..]->(y:Column {name:'colB', schema:'c.d'})
RETURN x,y;`

and the explain is illustrated below:

image

After executing the above cypher, it looks like stuck forever without returning anything. I think the culprit is the VarLengthExpand phase, the Neo4j version is enterprise-3.4.0, any suggestions? Thanks.

2

2 Answers

1
votes

First of all, upgrade. You're using a .0 release, and these are usually the most buggy kinds of releases (aside from the alphas). At the least, get to the latest patch release for the minor version you're interested in (so in your case, if you want 3.4.x, get the latest patch along the 3.4.x line).

Secondly, as both of these nodes can be looked up via the index, and as it seems you're only looking for a single path, not all possible paths, you may want to make use of shortestPath() after matching upon both of the nodes. Give that a try.

0
votes
MATCH (x:Column {name:'colA', schema:'a.b'}), (y:Column {name:'colB', schema:'c.d'})
MATCH path = (x)-[:CD]->(y)
RETURN path