Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-18-2019 03:38 AM
I have a huge graph with 8 millions of nodes.
I want set constant date property on all of relations. but I can't do it.
i use apoc.periodic.iterate for chunking.
when i use this cypher, i/o bottleneck occurred.
my cypher:
call apoc.periodic.iterate("match (:Node)<-[r:Rel]-(:Node) return r", "set r.date="2019-01-01" ,
{batchSize:100, iterateList:true, parallel:true})
none of cpu and ram don't use. just i/o worked hard.
05-18-2019 03:59 AM
You won't benefit from parallel:true
in this case.
Another thing to try is to prefix the first statement with cypher runtime=slotted
. Otherwise it might use compiled runtime which has issues upon streaming its results.
05-18-2019 04:40 AM
I test below query on small graph:
call apoc.periodic.iterate("match (u:User)<-[f:FOLLOWS]-(:User) return f" , "return f" , {batchSize:100, iterateList:true})
it's take 17264 ms.
and then run :
call apoc.periodic.iterate("cypher runtime=slotted match (u:User)<-[f:FOLLOWS]-(:User) return f" , "return f" , {batchSize:100, iterateList:true})
it's take 36799 ms.
have I mistake?
05-18-2019 12:03 PM
Looks OK with me. Slotted is slower but you'll benefit from streaming. Try with setting date now.
05-18-2019 08:55 PM
ok. thanks.
I think it make faster.
I have another question. for huge data when i/o is large it's better to use cluster for Neo4j?
05-19-2019 01:22 AM
Neo4j Causal Cluster helps you scaling your reads, but doesn't speed up writes.
All the sessions of the conference are now available online