- nebula 版本:3.5
- 部署方式:单机
- 安装方式:RPM
- 是否上生产环境:N
- 硬件信息
- 内存62G
- 问题的具体描述
做查询,百万级别的时候还能查询出来,但是当数据量上亿级别后就查询不出来了,一直超时,这些点也都有索引,在查询的时候内存的浮动也不大,执行大概10分钟左右都超时
我理解的是通过vid进行查询的话效率会比较高,在有索引的情况下不应该查询超时吧,是我的写法存在问题吗?是否有什么优化空间,希望得到各位大佬指点
目前nebula中的数据量:
查询语句1:
match p = (s:securityop)-[ov:overring]->(o:`order`)-[re:refund]->(t:tender)
where id(t) == '111'
and id(s) == '222'
with id(s) as sid,s.securityop.name as sname,s.securityop.phone as sphone,collect(id(o)) as list_order_number, o.`order`.store_code as store_code, t,count(re) as over_count, id(t) as tid, t.tender.is_empy as t_is_empy,collect(distinct o.`order`.business_day) as business_day
where over_count > 3
match (s)-[ov]->()-[re]->(t)-[pa:pay]->(o2:`order`)-[e]->(y:yumid)
where id(o2) in list_order_number
with sid,sname,sphone,list_order_number,store_code,over_count,tid,t_is_empy,business_day,collect(distinct id(y)) as yid
return sid,sname,sphone,list_order_number, store_code, over_count, tid,t_is_empy,business_day, yid
order by over_count desc
查询语句1 的日志
der_number, store_code, over_count, tid,t_is_empy,business_day, yid order by over_count desc
I20230816 09:48:30.786085 24135 FunctionUdfManager.cpp:93] Load UDF so library: /home/nebula/dev/nebula/udf/
E20230816 09:48:30.786172 24135 FunctionUdfManager.cpp:41] UDF Folder doesn't Exist!
I20230816 09:53:30.786302 24135 FunctionUdfManager.cpp:93] Load UDF so library: /home/nebula/dev/nebula/udf/
E20230816 09:53:30.786404 24135 FunctionUdfManager.cpp:41] UDF Folder doesn't Exist!
I20230816 09:54:13.822791 3668 SwitchSpaceExecutor.cpp:45] Graph switched to `new_xbr_main', space id: 44
I20230816 09:58:30.786639 24135 FunctionUdfManager.cpp:93] Load UDF so library: /home/nebula/dev/nebula/udf/
E20230816 09:58:30.786741 24135 FunctionUdfManager.cpp:41] UDF Folder doesn't Exist!
E20230816 10:02:15.162722 3864 StorageClientBase-inl.h:224] Request to "127.0.0.1":9779 time out: TTransportException: Timed out
E20230816 10:02:15.166168 3668 StorageClientBase-inl.h:143] There some RPC errors: RPC failure in StorageClient with timeout: TTransportException: Timed out
E20230816 10:02:15.173378 3668 StorageAccessExecutor.h:47] Traverse failed, error E_RPC_FAILURE, part 1
E20230816 10:02:15.173727 3673 QueryInstance.cpp:151] Storage Error: RPC failure, probably timeout., query: match p = (s:securityop)-[ov:overring]->(o:`order`)-[re:refund]->(t:tender) where id(t) == '111' and id(s) == '222' with id(s) as sid,s.securityop.name as sname,s.securityop.phone as sphone,collect(id(o)) as list_order_number, o.`order`.store_code as store_code, t,count(re) as over_count, id(t) as tid, t.tender.is_empy as t_is_empy,collect(distinct o.`order`.business_day) as business_day where over_count > 3 match (s)-[ov]->()-[re]->(t)-[pa:pay]->(o2:`order`)-[e]->(y:yumid) where id(o2) in list_order_number with sid,sname,sphone,list_order_number,store_code,over_count,tid,t_is_empy,business_day,collect(distinct id(y)) as yid return sid,sname,sphone,list_order_number, store_code, over_count, tid,t_is_empy,business_day, yid order by over_count desc
查询语句2:
match p = (s:securityop)-[ov:overring]->(o1:`order`)-[re:refund]->(t:tender)-[pa:pay]-(o2)-[e]->(y:yumid)
where id(s) == '222'
and id(t) == 111'
return p
;
查询语句2 的日志
I20230816 10:10:02.869058 3690 SwitchSpaceExecutor.cpp:45] Graph switched to `new_xbr_main', space id: 44
I20230816 10:10:20.432194 3673 SwitchSpaceExecutor.cpp:45] Graph switched to `new_xbr_main', space id: 44
I20230816 10:11:03.673588 3690 SwitchSpaceExecutor.cpp:45] Graph switched to `new_xbr_main', space id: 44
I20230816 10:12:05.917109 3639 SwitchSpaceExecutor.cpp:45] Graph switched to `new_xbr_main', space id: 44
I20230816 10:13:30.787408 24135 FunctionUdfManager.cpp:93] Load UDF so library: /home/nebula/dev/nebula/udf/
E20230816 10:13:30.787499 24135 FunctionUdfManager.cpp:41] UDF Folder doesn't Exist!
I20230816 10:18:30.787657 24135 FunctionUdfManager.cpp:93] Load UDF so library: /home/nebula/dev/nebula/udf/
E20230816 10:18:30.787750 24135 FunctionUdfManager.cpp:41] UDF Folder doesn't Exist!
E20230816 10:20:10.769313 3903 StorageClientBase-inl.h:224] Request to "127.0.0.1":9779 time out: TTransportException: Timed out
E20230816 10:20:10.771517 3641 StorageClientBase-inl.h:143] There some RPC errors: RPC failure in StorageClient with timeout: TTransportException: Timed out
E20230816 10:20:10.779794 3641 StorageAccessExecutor.h:47] Traverse failed, error E_RPC_FAILURE, part 1
E20230816 10:20:10.780009 3669 QueryInstance.cpp:151] Storage Error: RPC failure, probably timeout., query: match p = (s:securityop)-[ov:overring]->(o1:`order`)-[re:refund]->(t:tender)-[pa:pay]-(o2)-[e]->(y:yumid) where id(s) == '222' and id(t) == '111' return p ;