全文索引检索很慢

提问参考模版:

  • nebula 版本:3.1.0
  • 部署方式:分布式
  • 安装方式:RPM
  • 是否为线上版本:N
  • 硬件信息
    • 磁盘 100GB
    • CPU 12核心 i7-8700 CPU @ 3.20GHz、内存信息 16GB
  • 构建了全文索引,但是最后查询效率比较慢。(2000万的顶点)
    CREATE FULLTEXT TAG INDEX nebula_index_1 ON Person(name);
    我是针对Person Tag的name属性进行的建立全文索引,查询的执行过程如下,耗时100多秒。
    不应该是在elasticsearch那边命中文本(name)之后,直接拿vid去图数据库匹配吗?这样效率应该很快啊。(我直接连接elasticsearch去匹配文本检索,效率极快,毫秒级别),该如何优化?
3	Project	2	ver: 0, rows: 104, execTime: 15956us, totalTime: 15961us
2	Filter	4	ver: 0, rows: 104, execTime: 127001997us, totalTime: 127002001us
4	TagIndexFullScan	0	{ ver: 0, rows: 9996151, execTime: 0us, totalTime: 19464009us storage_detail: {IndexLimitNode(limit=9223372036854775807):16294165(us),IndexProjectionNode(projectColumn=[_vid,name,objectId]):16185124(us),IndexVertexScanNode(IndexID=5, Path=()):14755537(us)} "192.168.1.121":8229 exec/total: 16213368(us)/17440724(us) "192.168.1.121":8119 exec/total: 16097545(us)/17242533(us) "192.168.1.121":8009 exec/total: 16545880(us)/18018235(us) }
0	Start		ver: 0, rows: 0, execTime: 0us, totalTime: 21us

3.1.0的全文索引的确会比较慢 从ES查出来的不是vid,还需要再走一遍原生索引。这块在3.4重构了,可以等几天,马上发版了。

2 个赞

3.4 的版本可以查看这个帖子哈:NebulaGraph v3.4.0 release note,增强稳定性和优化内存管理 里面也有下载的链接。