cancel
Showing results for 
Search instead for 
Did you mean: 

Optimizing in-count searches with neo4j

I am building a social network like graph where we periodically would like to find all the nodes with an incoming count of greater than 2. E.g.

A->B
C->B
C->A
D->A
E->A

Should return node A.

I am new to neo4j and am still a bit confused about whether they will search through all the available rows. Is there an index I can use to optimize these queries? My search query is like this

EXPLAIN MATCH ()-[r:F]->(b:Person)
WITH b, count(r) AS count
WHERE count > 1
RETURN collect(b.username)

Thank you

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.