I have a large DB and when I try to execute my query:
https://textuploader.com/1cduz
It takes more than 4 days to finish.
Can you help me to build a new one that may be using APOC?
I have a large DB and when I try to execute my query:
https://textuploader.com/1cduz
It takes more than 4 days to finish.
Can you help me to build a new one that may be using APOC?
I think you are not using Constraints(or Indexes).
From your query, it looks like workId
is a unique key.
You should create a unique constraint on it for faster search in the MERGE
clause.
CREATE CONSTRAINT unique_work_id
ON (n:Work)
ASSERT n.workId IS UNIQUE
You can also check a few other tips on faster data load in this answer.