Neo4j查询响应非常慢,即使我已经加热了缓存

时间:2018-01-19 10:41:46

标签: neo4j

在我的neo4j数据库中, 36000000+节点 31000000+关系 20亿个属性

索引已创建,在启动neo4j后,我将缓存加热为:https://neo4j.com/developer/kb/warm-the-cache-to-improve-performance-from-cold-start/

但是当我第一次运行密码查询时,它非常慢,大约 30秒;第一次查询后消耗时间下降到 600 ms

相同的查询但更改了不同的实体,它也花费 30秒

有任何改进建议吗?

PS:

索引:

index on:area1(effectiveTime) index on:labelA(objId)

neo4j配置:

堆:20g,pagecache:15g, 数据库大小为7.9 G

密码查询:

match (v1:labelA {objId:"XXXX"})-[r1:ARelationship]->(loc1:area1)<-
   [r2:ARelationship]-(tmp:labelA ) 
   with collect (DISTINCT tmp.objId) as need1,v1,loc1,loc1.effectiveTime as T1
   match (v1)-[r1:BRelationship]->(loc2:area1)<-[r2:BRelationship]-(tmp:labelA )
   where tmp.objId in need1 and loc2.effectiveTime = T1
   with collect(tmp.objId)[..10] as top10,loc1,loc2
   return loc1.objId,loc2.objId ,top10, loc2.effectiveTime as time 
   order by time

enter image description here

0 个答案:

没有答案