Optimizing Cypher queries with lots of optional relationships
问题 I'm using Cypher over the batch REST API with Neo4j 2.0.1. I'm trying to optimize my queries which have lots of optional relationships. I'd like to retrieve all of the data in one shot to limit the number of round trips I have to make to the database. Even though I only have about 12000 nodes in my database, the queries are already starting to crawl (some are taking over 1.5 seconds to return 1000 nodes). I've set up a graph gist that goes into more detail at http://gist.neo4j.org/