To explain the problem i have to optimize a cypher query where i am getting nodes connected to a particular node after the subgraph is formed
The query looks like -
match (node{property})
apoc.call.subgraphnodes(
rel filter (has_X,is_y),
label filter (+x|/y|>z))
match (z)-[is_y]-(y)
return collect(z.id)
Problem statement: Question 1. Is there any way to avoid match statement so that the number of db hits can be reduced
Question 2. Is there a possibility in which i return relationships using subgraphAll and apply filter on a list of relationships like TYPE(relationships) = "is_y"