I have imported data using Michael Hunger\'s Batch Import, through which I created:-
4,612,893 nodes
14,495,063 properties
node properties are indexed.
5,300
You don't need:
WHERE NOT(a=b)
Two different identifiers are never the same node in a Pattern matcher.
Can you use profile
with your queries?
profile START u=node(467242)
MATCH u-[r1:LIKE|COMMENT]->a<-[r2:LIKE|COMMENT]-lu-[r3:LIKE]-b
RETURN u,COUNT(b)
It would also be interesting to see how many nodes are touched:
profile START u=node(467242)
MATCH u-[r1:LIKE|COMMENT]->a<-[r2:LIKE|COMMENT]-lu-[r3:LIKE]-b
RETURN count(distinct a),COUNT(distinct b),COUNT(*)
You can also reduce your MMIO settings to the real values:
neostore.nodestore.db.mapped_memory=180M
neostore.relationshipstore.db.mapped_memory=750M
If you declare all of your machine's RAM as heap it will compete with FS-buffers and the mmio buffers.
wrapper.java.initmemory=5000
wrapper.java.maxmemory=5000
Are you measuring the first run or subsequent runs of your queries?