This is a graph global query, with unlimited paths, so it might generate many billions or trillions of paths to look at. Esp. if you don't provide a direction.
if your nodes are all users, then you do the equivalent of finding all paths between the cross product of 16M^2 Perhaps you can describe your actual use-case that you try to solve? Michael On Wed, Jul 9, 2014 at 4:23 PM, Guitao Ding <[email protected]> wrote: > Hi all, > > I'm leaning to user neo4j for relation analysis recently. Today I found it > took too long for my cypher query took to finish. > > I used the batch importer <https://github.com/jexp/batch-import/tree/20> > to import all data into neo4j. And I wanted to find the smallest user_id > connected (directly or undirectly, path length no limit) to each user_id. > Below is the details: > > neo4j version: 2.1.2 > nodes num: 16M (three labels) > relation num: 10M > cypher query: > > match (n:user_id)-[:mapping*]-(d:user_id) > with n.value as user_id, > case when min(d.value) > n.value then n.value else min(d.value) end as > people_id > return user_id, people_id > > > What should I do to improve my query performance? Any suggestions would be > appreciated! > > Thanks in advance. > > Guitao > > -- > 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. > -- 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.
