I have this Cypher query to return the outgoing and incoming relationships of a certain type, for a certain node.
MATCH (n)-[r:INPUTWITH]-(m)
WHERE n.personid='12345'
RETURN m.personid, r.relid
LIMIT 5
It should be very simple query. However, it takes ~30seconds, for reason I don't understand.
I'm using Neo4J 2.0. I created an index on "personid" like this:
Label personLabel = DynamicLabel.label( "Person" );
BatchInserter inserter = inserter.createDeferredSchemaIndex( personLabel ).on( "personid" ).create();
Any ideas what's happening???
MATCH (n:Person)-[r:INPUTWITH]-(m)
and post back if that makes it any better – jjaderberg