【发布时间】:2013-07-23 05:45:06
【问题描述】:
这是对can't reproduce/verify the performance claims in graph databases and neo4j in action books 的跟进。我已经更新了设置和测试,不想过多改变原来的问题。
整个故事(包括脚本等)在https://baach.de/Members/jhb/neo4j-performance-compared-to-mysql
简短版:在尝试验证“图形数据库”一书中的性能声明时,我得到了以下结果(查询包含 n 个人的随机数据集,每个人有 50 个朋友):
My results for 100k people
depth neo4j mysql python
1 0.010 0.000 0.000
2 0.018 0.001 0.000
3 0.538 0.072 0.009
4 22.544 3.600 0.330
5 1269.942 180.143 0.758
“*”:仅单次运行
My results for 1 million people
depth neo4j mysql python
1 0.010 0.000 0.000
2 0.018 0.002 0.000
3 0.689 0.082 0.012
4 30.057 5.598 1.079
5 1441.397* 300.000 9.791
“*”:仅单次运行
在 64 位 ubuntu 上使用 1.9.2 我设置了具有以下值的 neo4j.properties:
neostore.nodestore.db.mapped_memory=250M
neostore.relationshipstore.db.mapped_memory=2048M
和 neo4j-wrapper.conf 与:
wrapper.java.initmemory=1024
wrapper.java.maxmemory=8192
我对 neo4j 的查询如下所示(使用 REST api):
start person=node:node_auto_index(noscenda_name="person123") match (person)-[:friend]->()-[:friend]->(friend) return count(distinct friend);
Node_auto_index 很明显
我能做些什么来加快 neo4j 的速度(比 mysql 更快)吗?
还有another benchmark in Stackoverflow也有同样的问题。
【问题讨论】:
标签: python mysql performance neo4j