can't you reduce the query and eliminate the step of:
"
unwind sub1 as sub2
with collect(sub2) as s1
"
just keep:
match(x) where id(x) in sub1
?
can't you reduce the query and eliminate the step of:
"
unwind sub1 as sub2
with collect(sub2) as s1
"
just keep:
match(x) where id(x) in sub1
?