Efficient Queries

I currently have this query that is taking too long to run on my personal computer. I am just using Neo4j Desktop.

call apoc.periodic.iterate('match(c:Channel)
with c
where p.pulse_interaction_id = c.pulse_interaction_id
set p.channel = c.channel, p.sub_channel = c.sub_channel,
p.is_paid_channel = c.is_paid_channel','',{batchSize:10000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0})

I have approximately 21,000,000 Channel Nodes and about 3,000,000 Pulse_interaction Nodes.

Every Channel Node and every Pulse_interaction Node have the property pulse_interaction_id.

This query pretty much makes my computer shut down.

Is there any way I can make this query more efficient?

Hi @jacob.vonderwell !

First I'll assume you already created an index on pulse_interaction_id for Channel and Pulse_Interaction.

Second, you may like inverting the MATCH's in order to reduce the number of batches you handle.

I have a third one that includes a different approach but I would wait before trying it.

Lemme know if it helps,