My company is currently working on a Neo4j model for a large amount of data where query time has to be extremely fast to answer some particular questions.
To give a little of context, one of the things our model has to support is to associate a person to the file it owns using the person's computer information.
One way we though for speeding queries up is to insert a direct link between a person and a file, as shown in this image
You can see we put the file's name inside the relationship, so it's faster to know quickly if a user owns a file by name.
We have questions regarding this solution, because there can be plenty of users (let's say around 50 000), that all have at least one computer, and all computers can have tens of thousands of files. We read that iterating over relations of a node is extremely fast and we tried creating a model that uses this.
What we'd like to know is:
- Is there a limit of relationship types that can be created in a database (for both enterprise and community edition).
- If no is there a cost to creating millions of different relationship types?
- Is that optimisation really profitable at query time? By optimisation i mean adding a direct link between a user and a file (whether it contains a the file's name or not)