I am new to NEO4J and I wanted to see how fast it is. I started to test it and I created a table in both MySQL and NEO4J, with these properties (fields):
id random_number time_stamp
And I wrote a program to generate mass data and inserted about 150 million rows (and Nodes in Neo4J). I can say the write speed was almost same.
So, I tested a select query in both databases. "I wanted to get one of the rows(nodes) with the random_id of 255454" (we know from this random id there are more than 30 rows)
NEO4J:
match (t:testLabel {random_id: 255454}) RETURN t LIMIT 50;
MySQL:
SELECT *
FROM test
WHERE random_id=255454 LIMIT 50
NEO4J took ~47 seconds and MySQL took about ~25 seconds to return results.
NEO4J size on disk became ~35GB and MySQL size on disk became ~5.2 GB
And both databases did not have index on the table or properties.
Hardware: CPU: Corei7-4770 | RAM: 12GB | SSD Hard disk
This is a simple test, I mean both databases were so simple and had basic structures and before testing I thought, NEO4J is faster than MySQL. As I really like NEO4J I want to find a solution and use it again.
According to my simple test, NEO4J is not reasonable for big and scalable projects. I want to know maybe there are some ways that make it amazingly faster! The performance test was so simple and all databases have to have it as well regardless of data modeling.
And what about the size on disk?
+ I found another comparing question by Jörg Baach that you may like to see.