- nebula 版本:3.4
- 部署方式:分布式 (三台服务器,各部署meta,graph,stroage独立服务节点)
- 安装方式:RPM
- 硬盘:HDD
CPU:16核
内存:256G - 问题描述:
不知道起始点和终止点,需查询出某条路径上所有点的id,使用match查询太慢,目前使用lookup第一个tag所有的点,然后管道查询关联下一个tag的点,依次查询到最后一个tag,然后把所有点id返回,但是性能较差,请教下怎么调优或者有没有其他更好的写法。
附上查询语句和执行计划
查询路径1介绍 :
vnf->vm->server->switch->switch
数据大小
vnf:6K+
vm:30W+
server:10W+
switch:2W+
路径查询数据量:1051413 耗时:28s+
查询语句:
LOOKUP ON vnf yield id(vertex) as vnfid |
GO FROM $-.vnfid OVER rel_virtual_machine_vnf YIELD dst(edge) as virtual_machineid,$-.vnfid as vnfid |
GO FROM $-.vnfid OVER rel_virtual_machine_vnf YIELD dst(edge) as virtual_machineid,$-.vnfid as vnfid |
GO FROM $-.compute_serverid OVER rel_hardware_hardware YIELD dst(edge) as switchid,$-.compute_serverid as compute_serverid,$-.virtual_machineid as virtual_machineid,$-.vnfid as vnfid |
GO FROM $-.switchid OVER rel_network_device YIELD dst(edge) as switch1id,$-.switchid as switchid,$-.compute_serverid as compute_serverid,$-.virtual_machineid as virtual_machineid,$-.vnfid as vnfid
执行计划:
查询路径2介绍:
port->port->switch
数据量:
port:180W+
switch:2W+
路径查询数据大小:127703,耗时:34s+
查询语句:
LOOKUP ON netdevice_physical_port yield id(vertex) as netdevice_physical_portid |
GO FROM $-.netdevice_physical_portid OVER rel_netdevice_physical_port_netdevice_physical_port YIELD dst(edge) as netdevice_physical_port1id,$-.netdevice_physical_portid as netdevice_physical_portid |
GO FROM $-.netdevice_physical_port1id OVER rel_physical_port_network_device YIELD dst(edge) as switchid,$-.netdevice_physical_port1id as netdevice_physical_port1id,$-.netdevice_physical_portid as netdevice_physical_portid
执行计划