Hi, so we are developing a new web application and utilising Neo4j to build reports on data.
Here is a use case scenario:
- User enters some search parameters into web form (selecting gender, age etc)
- A query is built and run against the database
- The results are presented to the user
- The user now wants to save this search and results
- Later on the user then wants to actually perform a search, against those search results
I can think of a couple of different ways of achieving point 4, but I wondered if the more experienced here might be able to offer better solutions or whether there is an efficient way of doing it?
One crude technique:
- Save the search query as a node and relate it to the user node in graph
- Create a relationship between that search node and the result nodes it found
However, the database is reasonably big (85m nodes, 600m+ relationships), and there will be many different searches run per day, with each search having results between a couple of hundred, up to potentially a few million.
This would end up with a lot of relationships being created from the search node to results. If we then wanted to actually perform a search against those results, is having that many relationships efficient?
Am I just worrying over nothing and this is an ok solution?
I am worried that say after 1 year of running this web app, there will be thousands of searches saved, with millions of those search-campaign relationships.