Hi,

I am using Community edition 3.5 and the following query throws a heap size error. Is there anything I could change in the query before i try to increase the heapsize?

```
CALL apoc.periodic.iterate(
"MATCH ((c1:citation) -[p1:probability]-> (:lda_topic) <-[p2:probability]- (c2:citation))
WHERE id(c1) < id(c2)
WITH c1, c2, toFloat(p1.prob) as w1, toFloat(p2.prob) as w2, 2 as precision
WITH c1, c2, w1 + w2 as w12, 10^precision as factor
WITH c1, c2, min(w12)/max(w12) as weight , factor
WITH c1, c2, 1 - round(factor * weight) / factor as weight
OPTIONAL MATCH (a:alias) -[:authored]-> (c1)
OPTIONAL MATCH (b:alias) -[:authored]-> (c2)
RETURN a, b, weight, c1.citation as citation1, c2.citation as citation2",
"CREATE (a)-[e:through_topics_WJ]->(b)
SET e.weight= weight,
e.citation1 = citation1
e.citation2 = citation2", {batchSize:5000}) // batch size reduced since there are lot of paths - maybe filter p1.weight+p2.weight > 0.25 or up (ideally > 1 )??
YIELD batches, total, errorMessages
```

Thanks