Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-01-2022 12:00 AM
Hi,
I have 6 mill nodes "Equipment" that I want to relate to 60.000 node "Product" by matching on 2 properties (.Manufacturer and .Model) that are common on both node types. Properties are indexed on both node types
This is time-consuming and prone to cause out-of-memory errors, are there any tricks I can apply?
I have tried
CALL apoc.periodic.iterate("
....
",{batchSize:10000, parallel:false})
Solved! Go to Solution.
04-01-2022 03:22 PM
Hi @bent.s.lund
The first step is to create indexes like this.
CREATE INDEX equipment_index FOR (n:Equipment) ON (n.Manufacturer, n.Model);
CREATE INDEX product_index FOR (n:Product) ON (n.Manufacturer, n.Model);
The "CALL apoc.periodic.iterate(" works fine even for nearly 100 million data.
04-01-2022 03:22 PM
Hi @bent.s.lund
The first step is to create indexes like this.
CREATE INDEX equipment_index FOR (n:Equipment) ON (n.Manufacturer, n.Model);
CREATE INDEX product_index FOR (n:Product) ON (n.Manufacturer, n.Model);
The "CALL apoc.periodic.iterate(" works fine even for nearly 100 million data.
04-02-2022 02:29 AM
Thanks koji,
you confirmed that my approach on this was correct! I must have done something wrong maybe with the indexes - when I tried again I was able to match and create relations between nodes.
Thanks for your help!
All the sessions of the conference are now available online