I am trying to visualise a large amount of spatial graph data, but preliminary results with ~100k nodes/edges aren't looking fast enough for querying and rendering as a user pans around a map.
With the following spatial query on my Neo4j spatially indexed layer (Simple Points Layer) queries are taking around 2-10s.
SearchRecords searchRecords = spatialLayer.getIndex().search(new SearchIntersectWindow(spatialLayer, env));
try (Transaction tx = dbService.beginTx()) {
for (SpatialDatabaseRecord spatialDatabaseRecord : searchRecords) {
//do stuff...
}
tx.success();
tx.close();
}
My actual data is more in the order of 50 million nodes/edges. Is there things I can do to get responsive (like sub 1 second) query performance from Neo4j spatial with a large number of nodes/edges?
I am using Neo4j 2.3.0 and Neo4j Spatial 0.15-neo4j-2.2.3