Here is a query that returns a row for every movie that has 2 or fewer actors. How can you make this query perform better?
"PROFILE
MATCH (m:Movie)<-[:ACTED_IN]-(a:Person)
WITH m, collect(a.name) as actorNames
WHERE size(actorNames) <= $maxActors
RETURN m.title, m.year, actorNames"
Solutions submitted between 8/30 and 9/9 will be eligible for a Neo4j T-Shirt drawing!
Best I could do was 20,050 db hits haha, I believe adding the "0 < " is unnecessary right? For size to return < 0 wouldn't be possible? And it adds processing time (and somehow db hits?) so below is very very very barely faster hahah