I've just started practicing with Neo4J and after reading some docs and tutorials I hace created my data model and I've come across a problem when dealing with nested nodes, a node that's related to another node with the same label and so on (there is no max to how many levels down the relationships go)
So basically a type belongs to a Person, and then each type can be a child of another type. What I'm attempting is to read all the types related to a person (and the children type nodes related to the highest type node). There are between 2000-3000 types per person and the nested type nodes can be as much as 10 levels deep.
Here is what I'm trying:
MATCH (p:Person{name: 'Bill'})-[*0..]-(t:Type) RETURN p, t
This makes the JVM run out of memory, the DB is hosted on a box with 2GB of memory for now, but will be upgraded later but I still feel like I'm missing something, how can such query require so much memory?
If I run the same query with a depth limit, the query runs fine up to depth 5, so
MATCH (p:Person{name: 'Bill'})-[*0..4]-(t:Type) RETURN p, t
This query works fine and gives me back about 2308 nodes and 2307 relationship for one Person.
Is the solution just to host the DB on a box with more memory, but even then, what happens when the DB gets multiple requests at the same time?
I feel like I'm missing something.
