我已成功将dblp数据集迁移到neo4j数据库,并使用neo4jShell运行cypher查询。该数据库具有数百万个出版物和作者之间的节点和关系。现在,当我尝试在neo4j数据库上运行查询时,处理需要10到12小时,然后最终出现以下错误:
Error occurred in server thread; nested exception is: java.lang.OutOfMemoryError: Java heap space 我正在使用neo4j社区版版本2.2.3、jdk 1.7机器,内存为8GB和核心i7处理器。
查询:
Error occurred in server thread; nested exception is: java.lang.OutOfMemoryError: Java heap space 我正在使用neo4j社区版版本2.2.3、jdk 1.7机器,内存为8GB和核心i7处理器。
查询:
neo4j-sh (?)$ MATCH (p:`publication`)-[:`publishedby`]->(a:`author`)
RETURN p.year, p.type, a.id, count(*) order by a.id desc LIMIT 25;
请专家们为我提供任何从这个异常中解决的方法。
MATCH (a:author) WITH a LIMIT 25 MATCH (p:publication)-[p:publishedby]->(a) RETURN p.year, p.type, a.id ORDER BY a.id desc
。使用WITH
语句。 - FylmTM