Hi all!
starts from beginning, I would like to check performance MySQL and Neo4j in
graph traversing therefore I created sql database composed of two tables:
customer and customerfriend. Second one contains two keys: CustomerID, and
FriendID which point to CustomerID in customer table. In Neo4j I created
corresponding entities - 'Customer' nodes and 'FRIEND_OF' relations -
(c:Customer)-[f:FRIEND_OF]->(cc.Customer) . Both databases contain same
data: 100000 Customers, each Customer has 100 relations.
I perfomed tests using below queries:
*Neo4j*:
match (c:Customer{CustomerID:99})-[:FRIEND_OF*4]->(cc:Customer) (*240s*)
return distinct cc.CustomerID;
*MySQL:*
SELECT distinct cf4.FriendID FROM customerfriend cf1 (*60s*)
join customerfriend cf2 on cf1.FriendID = cf2.CustomerID
join customerfriend cf3 on cf2.FriendID = cf3.CustomerID
join customerfriend cf4 on cf3.FriendID = cf4.CustomerID
where cf1.CustomerID =99;
I have tested queries for 50 relations per customer, and I achieved same
results (Neo4j slower than MySQL)
Queries are run from simple Java application, which just connect to
database (using available connectors), run queries and measure execution
times.
Finally I recieved unexpected results- Neo4j is slower than MySQL in
performing above query (Neo4j 240s, MySQL 60s). Before starting my tests I
read some articles which shows that Neo4j works better in case of recursive
queries than MySQL, that's why I'm start wondering if I'm doing something
wrong or measured times are proper (?).
I'm wondering if in Neo4j exists any possibilites to tune system
performance (increase buffer size or something). In case of MySQL I set up
innodb_buffer_pool_size to 3G which affected better query performace
(shorter execution time).
These tests are crucial for experimental part in my myster thesis and I'll
be very greatful for any hints and help
Thanks in advance!
Artur
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.