I have in my graph ~1M nodes and ~1M relations.
My motivation for query is to retrieve all related nodes(by 3 hops) of specific source node + aggregate properties within the response.
I understood the shortestPath taking your sourceNode and query all other nodes(not necessarily related ones) in the graph to match the relevant results.
My latency is around 2-4 seconds when I have load (~4000 concurrent connections). it's too high.
Any idea how could I optimize my query for better performances?
MATCH p=shortestPath((user:User{userId:<someUser>})-[r:relation_type1|relation_type2|relation_3*1..3]-(user:User))
WHERE f <> user
RETURN (f.userId) as userId,
reduce(base = '', rel in r | base + ' ' + rel.dist) as dist
* notes: userId and relation_type1/2/3 are auto indexed
* I am using the rest client and recently thought to upgrade into the new BOLT driver(not sure it will helps)
Thank you.