graph - Neo4j - Path count performances -



graph - Neo4j - Path count performances -

i'm working neo4j 2.1.7. i'm trying count paths starting node , terminating same node (i.e. loops), maximum given path length.

my (very simple) query is

match p=(n:mylabel) -[r*..maxlength]- (n) homecoming n.myid, count(p)

the entire graph has 200k nodes, while mylabel nodes 50k, i'm having poor performance low values of maxlength (5 or 6).

how can improve?

thanks in advance

this global graph query, create exponential results.

e.g. if have 100 rels per node, 6 steps out 100^6 = 1.000.000.000.000 paths find per node , go on nodes.

i recommend instead @ shortestpath, so, doing 50k times still lot, seek utilize profile output query plan see amount of info touch.

match (n:mylabel) match shortestpath((n)-[*..maxlength]- (n)) homecoming n.myid, count(*)

it might neo4j 2.2 new query planner improve @ that.

graph neo4j cypher database-performance

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -