Creating nodes and relationships at the same time in neo4j

前端 未结 4 635
夕颜
夕颜 2021-02-08 06:06

I am trying to build an database in Neo4j with a structure that contains seven different types of nodes, in total around 4-5000 nodes and between them around 40000 relationships

4条回答
  •  无人共我
    2021-02-08 06:43

    If you're able to use the Neo4j 2.1 prerelease milestones, then you should try using the new LOAD CSV and PERIODIC COMMIT features. They are designed for just this kind of use case.

    LOAD CSV allows you to describe the structure of your data with one or more Cypher patterns, while providing the values in CSV to avoid duplication.

    PERIODIC COMMIT can help make large imports more reliable and also improve performance by reducing the amount of memory that is needed.

提交回复
热议问题