I am running below query with is dealing with large volume of data and it enters in a forever loop.
match (t1)-[:IN|OUT]-(a1:add) where a1.add= 'abc' return collect(DISTINCT t1) AS tx
is there any way to make this working ??
I am having index on add property and total number of nodes in db around 700000000 and total relationships are around 2400000000
I am having only one label for t1 and checked with the label as well but the same result.
yes I need to collect the whole record since I need to pass the whole record in another query as list and need to use some of the properties of the node
I believe apoc.periodic.commit() doesn't yield the results so could you please suggest me cypher syntax with apoc.periodic.commit() for returning result ?
You might try to first run this in two segments - first get a match for just a1; then use WITH a1, and include the rest of the query. My guess is the issue is with accessing the attribute although you may need to run two queries to address IN and OUT separately. First see if you can run a simple match on (a1 {add: 'abc'}) and get results back reasonably..
You also may want to reconsider using collect(). Why is that needed? Vs. just DISTINCT t1?
Yes i tried with One relationship at a time still same result.
Note: if i will run both relationships together then distinct count would be 44000 nodes