【发布时间】:2017-12-30 08:49:06
【问题描述】:
我用的是neo4j-community-3.3.0,会有:
- 节点数:20000,
- 关系:72000,
- 每个节点的属性:1,
- 属性 per_relationship:1
我的机器有:
- 内存:16G,
- dbms.memory.pagecache.size:6G,
- dbms.memory.heap.max_size:8G
我想将所有节点连接到一个节点并汇总与这些节点相关的关系属性并将结果发送到 csv 文件。我想对数据库中的所有节点执行此操作。
我有一个关于关系属性的索引-
INDEX ON :Amount(AMNT), and a Constraints on node property-CONSTRAINT ON (customer:Customet) ASSERT customer.ACCT IS UNIQUE
我的查询是:
CALL apoc.export.csv.query("MATCH (x:Customer) with x CALL
apoc.cypher.run(\"CALL apoc.path.expandConfig(x,
{relationshipFilter:'Amount>', labelFilter:'+Customer', uniqueness:
'NODE_PATH' } ) YIELD path return path as path\", {x:x}) YIELD value
unwind nodes(value.path) as nodes unwind relationships(value.path) as
rels with collect(distinct nodes) as nodelist, collect(distinct rels)
as rellist,x.ACCT as CustNumber with size(nodelist) as numOfMember,
reduce(s = 0, r IN rellist | s + TOINT(r.AMNT)) AS totalAMNT
,CustNumber where (numOfMember > 100) and ( totalAMNT > 100000) return
CustNumber,numOfMember,totalAMNT ","results.csv",{});
但是查询运行很慢,很长一段时间后我得到这个错误:
解组返回标头时出错;嵌套异常 是:java.net.SocketException:软件导致连接中止:recv 失败
请帮帮我。
【问题讨论】:
标签: neo4j