Question about transaction handling within apoc periodic commit

196 views
Skip to first unread message

Marco P

unread,
Mar 4, 2018, 11:23:30 AM3/4/18
to Neo4j
Hi,

I need to create a large number of nodes with data loaded from a file. I was planning to implement this as a stored procedure because of performance reasons. I might even get around implementing it myself by using one of the load procedures from apoc. But in any case I need to split this up in several transactions to avoid getting out of memory. Is it possible to use one of the apoc periodic procedures for this as this example for loading data in the apoc documentation suggests? I was wondering whether this works with top level transactions which would help to avoid getting out of memory or if this is more about nested transactions and doesn't help in my case. Any explanations on this would be very helpful.

Best,

Marco

Michael Hunger

unread,
Mar 4, 2018, 2:15:09 PM3/4/18
to ne...@googlegroups.com
Yes apoc.periodic.iterate would help you there which you can combine with apoc.load.xxx as driving statement.

It's about the memory needed for tx state.
apoc.periodic.iterate creates new transactions (in separate threads) to be independent of the running top-level tx.

HTH Michael



--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco P

unread,
Mar 5, 2018, 2:31:48 AM3/5/18
to Neo4j
Hi Michael,

thanks for the clarification and the quick response!

Best,
Marco
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages