Slow simple match/traversing, even after indexing

5 views
Skip to first unread message

jam

unread,
May 19, 2018, 7:17:55 AM5/19/18
to Neo4j
I have a graph of ~49M nodes and ~37M edges, and am getting 8590ms total query time (streaming after 14ms, completed after 8590ms) when running the following simple query where the queried attributes for the labels have been indexed as well:

MATCH (n:names {name: "dummy name"})-[:ID|IS_A|`FIRST NAME`|`SECOND NAME`|NAME*1..3]-(similar {type:"name"}) RETURN DISTINCT(similar)

What this query does (or is meant to do) is retrieve all nodes of type "name" starting from a node with "dummy name" attribute, as long as these are connected by any of the listed edge types.

Originally I was after infinite length but the query never completes. I ran this with a depth of 2 (*1..2) and completion time decreases to 111 ms. I have also increased the memory configuration to 10GB to get memory configuration "out of the way" during this troubleshooting.

Any ideas what could be optimized (or what could I be doing wrong), and why infinite traversing doesn't complete (within 5 mins).

Thanks!

PS. All queries were executed through neo4j desktop browser. 
Reply all
Reply to author
Forward
0 new messages