Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-16-2021 05:34 AM
Hi guys,
I'm new at the Graph DataBase world and also Neo4J.
Currently, I want to try to insert a bunch of data into my Database via multiple large cypher statements.
Whats the best way to generate this cypher statements. (Currently I have writing time of ~120 seconds for each dataset, but read more details below)
More Details:
I want to compare in my thesis Graph database vs. Relational database for a specific use case, where multiple components are linked together, For that I have created a big datamodel in C#.
Main points I want to check first are the reading/writing times in graph / relational database (with different steps (200 / 400 / 800 / 2000 / 4000 ....) .
After generating such a model I have a method which generates me a big cypher statement where I do multiple Merge Statements and create all nodes / relationships which are necessary.
(currently ~300-500 Lines of cypher statement)
This cypher statement is then send via C# SDK to the graph database to store the data.
I can also provide an example code, where you can try it yourself, and give me direct feedback to the created query.
I would be really happy for any hints / help / feedback to my query.
(provided query take > 60 Seconds to be stored in a fresh database, also with unique indices on each label)
Thanks Christian
ExampleScript.txt (23.6 KB)
CreateConstraints.txt (1.6 KB)
07-16-2021 06:38 AM
Currently, after further research, it seems to me, that creating the relationships is the bottleneck..
if I just create all the Nodes together, => Duration (106 Nodes, 127 labels, 330 properties 3185ms).
Than I make a Match statement for all created Nodes, and add the relationships. => Duration 106 Relationships 8363 ms)
Examplescript_splitted.txt (16.2 KB)
MatchNode_mergerelationship.txt (9.1 KB)
All the sessions of the conference are now available online