nGQL 查询路径,以及性能优化

nebula 版本:3.5.0
部署方式:目前单机,后面可能分布式部署
安装方式:二进制版本
是否上生产环境:N

以前使用neo4j能查询出来,数据量大概在80万左右,现在切换nebula数据库,用studio后台查询时,nebula服务器直接崩了

问题:通过一系列查询得到with g1,g2,middids(id集合)
然后match p3=(g1:geo)-[r*]-(g2:geo) wher e all (n in nodes(p3) where id (n) in midids ) return p3
nebula服务直接崩了。用explain等执行计划时,依赖关系复杂。

其中r只映射一种边的关系。

我还尝试使用find path等查询语法
1 分两步查询,先查询返回g1,g2,middids(id集合),然后g1看作起点,g2看作终点,双向边匹配查询所有路径,下面是ngql语句,
缺陷很明显,跳多少得写死,我在studio后台查询时,直接写死10步,即upto 10 steps,nebula服务器直接崩了。

find all path with drop from id(g1)to id(g2) over * bidirect upto 50 steps
yield path as p |yield $-.p where all (n in nodes($-.p )where id(n) in middids)

自己感觉:上面两种查询方法,也不知道对不对,我感觉是先得到所有路径,再通过where all等条件去过滤,而不是路径走到某个点,发现不在middids,
直接过滤,去查询下一个路径, 怎么样边查边过滤呀,各位大佬,帮帮忙,谢谢啦

求求大家的方案。

  1. find path如果不需要属性的话,可以把with prop去掉;
  2. 另外,看下你的schema的配置,包括space的设置和vid的设置
  3. 建议也看下你的机器配置

好的,目前在找替代的方案

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。