I have the following cypher query:

MATCH (n:User{id:'id'}) - [:HAS_FAX_NUMBER] -> () <-[:HAS_FAX_NUMBER]-(m1) 
MATCH p = allShortestPaths((n)-[*]-(m1))
RETURN m1.fhid AS SuggestedUser, COUNT(*) as Connections
UNION
MATCH (n:User{id:'id'}) - [:HAS_PHONE_NUMBER] ->() < - [:HAS_PHONE_NUMBER] 
-(m2) MATCH p = allShortestPaths((n)-[*]-(m2))
RETURN m2.fhid AS SuggestedUser, COUNT(*) as Connection

This query is quite slow: 3 mins. Is there a way to speed this up? I am 
basically try to find the how connected is the user in question with m1 or m2. 
There might be another approach to this. Any ideas or suggestions? Thanks in 
advance!



-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to