我有一个相对较小的图表(2.5M 节点,5M rel,7.7M 属性)并且我正在执行(在我看来)一个简单的查询,但在基于 SSD 的快速笔记本电脑上执行需要 63 秒。这真的是我应该从 Neo4j 获得的性能,还是查询有什么问题?
start ph=node(2)
match ph-[:NEXT_LEVEL]->c
where c.tag = "class 1"
with c
match c-[:NEXT_LEVEL]->p<-[:SOLD]-l<-[:LINE]-h-[:SOLD_IN]->s
return s.tag as store, sum(l.item_quantity) as quantity order by s.tag;
更新:只想发布更新的查询:
start ph=node(2)
match ph-[:NEXT_LEVEL]->c-[:NEXT_LEVEL]->p<-[:SOLD]-l<-[:LINE]-h-[:SOLD_IN]->s
where c.tag = "class 1"
with s.tag as store, sum(l.item_quantity) as quantity
return store, quantity order by store;