I have a basic neo4j database with 10 nodes (no relationships). I am running embedded mode and starting the server/webadmin as follows:
GraphDatabaseService graphDb;
graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder("/path/to/data/directory").newGraphDatabase();
WrappingNeoServer srv = new WrappingNeoServer((GraphDatabaseAPI) graphDb);
srv.start();
Once I create the nodes, query performance is fine, but when I restart the server, query performance for basic cypher queries becomes slow. The following query takes about 1-3 seconds:
MATCH (n) RETURN count(n);
Before a restart (immediately after the nodes are created), this query is less than 100ms.
Here is a link to the data directory I am using: https://drive.google.com/file/d/0B1pENwDgk7SQTFkxU1BGd2poeUU/edit?usp=sharing
I am running version 2.0.1.
What could be causing this slow performance?