I'm working with Neo4j 2.1.7. I'm trying to count the paths starting from a node and terminating to the same node (i.e. loops), with maximum given path length.
My (very simple) query is
match p=(n:MyLabel) -[r*..maxLength]- (n)
return n.myid, count(p)
The entire graph has 200k nodes, while MyLabel nodes are only 50k, but I'm having very poor performance even with low values of maxLength (5 or 6).
How can I improve?
Thanks in advance