I am running the query below in Neo4j browser. I have 2 labels and 1 relationship in the database. One label has 50,000 nodes and the other has 1,800 nodes, and there are 48,000 relationships.
MATCH (u)-[r]->(n)
WITH u, COLLECT(n) AS ns, COLLECT(r) AS rs
WHERE SIZE(ns) > 1
RETURN u, ns, rs
This query takes about 5 minutes to run, even though the resulting code tab says Started streaming 7437 records after 98 ms and completed after 199 ms. I thought this might be due to the visualization process so I went to configuration and put initial node display, max neighbors, and max rows all to 0. It still takes about 5 minutes. Any ideas as to what could be causing this lag?