Right now, to return a sub graph from Neo4J, I use
Match(n{id:"<uuid>"}) OPTIONAL MATCH (n)-[*..25]->(m) RETURN DISTINCT *
This is very inefficient for deeply interconnected graphs (as without RETURN DISTINCT, I get 100k results as apposed to a measly under 100 results.
How do I efficiently request all sub-nodes of a node without using APOC? (AKA, make the DISTINCT redundant instead of required in the matching; AKA, visit each node only once during matching?)