我试图在一个图中找到一个连接组件中的所有节点,其中包含大约 130M 个顶点和大约 350M 条边。
以下是我用来查找连接组件中节点数的查询 -
输入 - 起始顶点 id/name
输出 - 连接组件中的节点数。
查询 - malloc()
上述查询大约需要 52 秒
RepeatStep 大约需要 29 秒
有没有办法优化Repeatstep中的线性遍历或WherePredicateatep中的查找?
上述查询的配置文件输出-
g.v().has("name","driver1").repeat(where(without ("a")).store("a").both().simplePath().dedup()).emit().hasLabel("driver").count().fold()