creating many records in a single query #849
Replies: 2 comments
-
Hi KillJoy. Is the out of memory exception being thrown by the server or in the driver? Your initial suggestion of batching is the approach I would take to tackle this. One other observation, if you are using driver sessions then you need to be aware that they are not thread safe. They are designed to be light weight and short lived without being shared across threads. The driver itself is thread safe. |
Beta Was this translation helpful? Give feedback.
-
@AndyHeap-NeoTech Regarding thread safe ....I am not executing parallel creation (instead wait for one batch to complete to start another). I've tried using UNWIND |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an API that does multiple tasks in multiple threads. (In a single transaction)
Suppose in a task, it is creating 6000 records in a single query
Format is like
MATCH (a:A)
/// 6000 subqueries for creating
NOTE : And we are consuming all the executed queries even though we do not need them, for immediate commit.
Now, for the above query, it throws Out of Memory Exception. some heap was out of memory.
How do you tackle this.
I solution I can do is run in batches.
Any thing else?
Beta Was this translation helpful? Give feedback.
All reactions