I am trying to create a database in Neo4j with a structure that contains seven different types of nodes, about 4-5000 nodes in total and about 40,000 relationships between them. The cypher code I'm currently using is that I first create nodes with code:
Create (node1:type {name:'example1', type:'example2'})
About 4000 of this example with unique nodes.
Then I have a relationship declared as such:
Create (node1)-[:r]-(node51), (node2)-[:r]-(node5), (node3)-[:r]-(node2);
About 40,000 of these unique relationships.
With smaller charts, this was not a problem at all. But with this, the Executing request never stops loading.
Any suggestions on how I can get this type of query to work? Or what should I do instead?
to change. What I'm trying to build is a large graph over the product, with its release, release of versions, functions, etc. Just as the example of a film count is built.
The product has about 6 releases, each release has about 20 versions. In total there are 371 functions, and out of 371 functions there are also 438 functions. (120 total), then it has about 2-300 functions each. These Featureversions are mapped to its function, which has dependencies on everything in db. I also included HW dependencies, such as a possible hw to run these functions, releases on etc., so they mostly use cypher code, for example:
Create (Product1:Product {name:'ABC', type:'Product'}) Create (Release1:Release {name:'12A', type:'Release'}) Create (Release2:Release {name:'13A, type:'release'}) Create (ReleaseVersion1:ReleaseVersion {name:'12.0.1, type:'ReleaseVersion'}) Create (ReleaseVersion2:ReleaseVersion {name:'12.0.2, type:'ReleaseVersion'})
and below those that I structured using
Create (Product1)<-[:Is_Version_Of]-(Release1), (Product1)<-[:Is_Version_Of]-(Release2), (Release2)<-[:Is_Version_Of]-(ReleaseVersion21),
All the way to functions, and then I also added dependencies between them, for example:
(Feature1)-[:Requires]->(Feature239), (Feature239)-[:Requires]->(Feature51);
Since I had to find all this information from many different excel lists, etc., I made the code this way, thinking that I could just combine it into one massive cypher request and run it in / browser on localhost. It worked really well until I used more than 4-5000 requests at a time. Then he created the whole database in about 5-10 seconds, but now when I try to run about 45000 queries, at the same time it works for almost 24 hours and it still loads and says "query execution ...". I wonder if in any case I can improve the time needed to create the database? or can i do some smarter indexes or other things to improve performance? because, by the way, my cipher is written now, I canβt divide it into parts, since everything in the database has some kind of connection with the product. Do I need to rewrite the code or is there some kind of smooth path?