find path查询2个顶点之间5跳路径,查询速度慢

nebula3.8.0版本,顶点数据量大约3亿,边的数据量大约7亿,用find path查询2个顶点之间的5跳路径,查询所有边,耗时2分30秒左右,指定部分边也要1分钟,有哪些好的方法能提高查询速度。在nebula-graphd.conf中添加num_operator_threads=10也没有提升速度。
机器配置:3台,128G内存,64核
nebula版本:3.8.0
查询语句:find noloop path with prop from “C38112308298660550” to “C4139858135377459328” over * upto 5 steps yield path as p | limit 10;
num_operator_threads:这个参数按照文档介绍的调整过,对查询速度没有提升。
执行计划:
id | name | dependencies | profiling data | operator info |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 8 | Project | 9 | { | outputVar: { |
| | | | “execTime”: “299(us)”, | “colNames”: [ |
| | | | “rows”: 10, | “p” |
| | | | “totalTime”: “304(us)”, | ], |
| | | | “version”: 0 | “type”: “DATASET”, |
| | | | } | “name”: “__Limit_6” |
| | | | | } |
| | | | | inputVar: __Limit_7 |
| | | | | columns: [ |
| | | | | “PathBuild[$-._src,$-._edge,$-._dst]” |
| | | | | ] |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 9 | AllPaths | 2,3 | { | outputVar: { |
| | | | “buildAdjTime reverse step[1]”: “486(us)”, | “colNames”: [ |
| | | | “buildAdjTime reverse step[2]”: “1231061(us)”, | “_src”, |
| | | | “buildAdjTime reverse step[3]”: “47318304(us)”, | “_edge”, |
| | | | “buildAdjTime step[1]”: “4770(us)”, | “_dst” |
| | | | “buildAdjTime step[2]”: “2197097(us)”, | ], |
| | | | “build_path_time”: “30975586(us)”, | “type”: “DATASET”, |
| | | | “conjunct_path_time”: “30975534(us)”, | “name”: “__Limit_7” |
| | | | “execTime”: “317(us)”, | } |
| | | | “resp[0]”: { | inputVar: { |
| | | | “exec”: “177966(us)”, | “rightVar”: “__Dedup_3”, |
| | | | “host”: “10.66.36.76:9779”, | “leftVar”: “__Dedup_2” |
| | | | “total”: “592407(us)” | } |
| | | | }, | noloop : true |
| | | | “resp[1]”: { | withProp : true |
| | | | “exec”: “177053(us)”, | steps: 5 |
| | | | “host”: “10.66.36.53:9779”, | filter: |
| | | | “total”: “540843(us)” | stepFilter: |
| | | | }, | offset: 0 |
| | | | “resp[2]”: { | limit: 10 |
| | | | “exec”: “256084(us)”, | vertexProps: [ |
| | | | “host”: “10.66.36.85:9779”, | { |
| | | | “total”: “709795(us)” | “props”: [ |
| | | | }, | “company_name”, |
| | | | “reverse step[1]”: [ | “identity_id”, |
| | | | { | “leg_represent”, |
| | | | “exec”: “1678(us)”, | “reg_capital”, |
| | | | “host”: “10.66.36.85:9779”, | “found_dt”, |
| | | | “storage_detail”: { | “company_state”, |
| | | | “GetNeighborsNode”: “987(us)”, | “project_type”, |
| | | | “HashJoinNode”: “661(us)”, | “_tag” |
| | | | “RelNode”: “988(us)”, | ], |
| | | | “SingleEdgeNode”: “524(us)”, | “tagId”: 5 |
| | | | “TagNode”: “106(us)” | }, |
| | | | }, | { |
| | | | “total”: “3200(us)”, | “props”: [ |
| | | | “vertices”: 1 | “name”, |
| | | | } | “_tag” |
| | | | ], | ], |
| | | | “reverse step[2]”: [ | “tagId”: 6 |
| | | | { | } |
| | | | “exec”: “27128(us)”, | ] |
| | | | “host”: “10.66.36.76:9779”, | edgeProps: [ |
| | | | “storage_detail”: { | { |
| | | | “GetNeighborsNode”: “70997(us)”, | “props”: [ |
| | | | “HashJoinNode”: “28719(us)”, | “_dst”, |
| | | | “RelNode”: “71007(us)”, | “_rank”, |
| | | | “SingleEdgeNode”: “23736(us)”, | “_type”, |
| | | | “TagNode”: “4136(us)” | “company_uid”, |
| | | | }, | “data_type”, |
| | | | “total”: “62363(us)”, | “holder_name”, |
| | | | “vertices”: 51 | “holder_pct”, |
| | | | }, | “holder_type”, |
| | | | { | “holder_uid” |
| | | | “exec”: “507230(us)”, | ], |
| | | | “host”: “10.66.36.85:9779”, | “type”: -8 |
| | | | “storage_detail”: { | }, |
| | | | “GetNeighborsNode”: “641917(us)”, | { |
| | | | “HashJoinNode”: “24980(us)”, | “props”: [ |
| | | | “RelNode”: “641923(us)”, | “_dst”, |
| | | | “SingleEdgeNode”: “20675(us)”, | “_rank”, |
| | | | “TagNode”: “3480(us)” | “_type”, |
| | | | }, | “from_uid”, |
| | | | “total”: “918420(us)”, | “real_type”, |
| | | | “vertices”: 38 | “to_uid”, |
| | | | }, | “turnover” |
| | | | { | ], |
| | | | “exec”: “39885(us)”, | “type”: -21 |
| | | | “host”: “10.66.36.53:9779”, | }, |
| | | | “storage_detail”: { | { |
| | | | “GetNeighborsNode”: “117515(us)”, | “props”: [ |
| | | | “HashJoinNode”: “45857(us)”, | “_dst”, |
| | | | “RelNode”: “117524(us)”, | “_rank”, |
| | | | “SingleEdgeNode”: “30268(us)”, | “_type”, |
| | | | “TagNode”: “14691(us)” | “first_loan_amount”, |
| | | | }, | “from_uid”, |
| | | | “total”: “95152(us)”, | “latest_loan_amount”, |
| | | | “vertices”: 48 | “latest_repayment_amount”, |
| | | | } | “latest_repayment_date”, |
| | | | ], | “repayment_sum_amount”, |
| | | | “reverse step[3]”: [ | “to_uid” |
| | | | { | ], |
| | | | “exec”: “1472411(us)”, | “type”: -17 |
| | | | “host”: “10.66.36.76:9779”, | }, |
| | | | “storage_detail”: { | { |
| | | | “GetNeighborsNode”: “32207710(us)”, | “props”: [ |
| | | | “HashJoinNode”: “23204977(us)”, | “_dst”, |
| | | | “RelNode”: “32215574(us)”, | “_rank”, |
| | | | “SingleEdgeNode”: “21700139(us)”, | “_type”, |
| | | | “TagNode”: “1103192(us)” | “branch_org_uid”, |
| | | | }, | “company_uid” |
| | | | “total”: “7676925(us)”, | ], |
| | | | “vertices”: 70543 | “type”: -12 |
| | | | }, | }, |
| | | | { | { |
| | | | “exec”: “1767532(us)”, | “props”: [ |
| | | | “host”: “10.66.36.53:9779”, | “_dst”, |
| | | | “storage_detail”: { | “_rank”, |
| | | | “GetNeighborsNode”: “36308795(us)”, | “_type”, |
| | | | “HashJoinNode”: “27003160(us)”, | “amount”, |
| | | | “RelNode”: “36317567(us)”, | “currency”, |
| | | | “SingleEdgeNode”: “25513552(us)”, | “from_uid”, |
| | | | “TagNode”: “1068979(us)” | “inc_type”, |
| | | | }, | “prod_name”, |
| | | | “total”: “7590155(us)”, | “to_uid” |
| | | | “vertices”: 70787 | ], |
| | | | }, | “type”: -23 |
| | | | { | }, |
| | | | “exec”: “1860051(us)”, | { |
| | | | “host”: “10.66.36.85:9779”, | “props”: [ |
| | | | “storage_detail”: { | “_dst”, |
| | | | “GetNeighborsNode”: “42514677(us)”, | “_rank”, |
| | | | “HashJoinNode”: “30937948(us)”, | “_type”, |
| | | | “RelNode”: “42525215(us)”, | “amount”, |
| | | | “SingleEdgeNode”: “29042665(us)”, | “from_uid”, |
| | | | “TagNode”: “1410004(us)” | “ratio”, |
| | | | }, | “to_uid” |
| | | | “total”: “8882963(us)”, | ], |
| | | | “vertices”: 72745 | “type”: -22 |
| | | | } | }, |
| | | | ], | { |
| | | | “rows”: 10, | “props”: [ |
| | | | “step[1]”: [ | “_dst”, |
| | | | { | “_rank”, |
| | | | “exec”: “4944(us)”, | “_type”, |
| | | | “host”: “10.66.36.85:9779”, | “equity_amount”, |
| | | | “storage_detail”: { | “from_uid”, |
| | | | “GetNeighborsNode”: “3891(us)”, | “reg_date”, |
| | | | “HashJoinNode”: “795(us)”, | “to_uid” |
| | | | “RelNode”: “3891(us)”, | ], |
| | | | “SingleEdgeNode”: “698(us)”, | “type”: -20 |
| | | | “TagNode”: “62(us)” | }, |
| | | | }, | { |
| | | | “total”: “9059(us)”, | “props”: [ |
| | | | “vertices”: 1 | “_dst”, |
| | | | } | “_rank”, |
| | | | ], | “_type”, |
| | | | “step[2]”: [ | “from_uid”, |
| | | | { | “pledge_amount”, |
| | | | “exec”: “48479(us)”, | “pledge_ratio”, |
| | | | “host”: “10.66.36.76:9779”, | “start_date”, |
| | | | “storage_detail”: { | “to_uid” |
| | | | “GetNeighborsNode”: “466995(us)”, | ], |
| | | | “HashJoinNode”: “208279(us)”, | “type”: -19 |
| | | | “RelNode”: “467056(us)”, | }, |
| | | | “SingleEdgeNode”: “192776(us)”, | { |
| | | | “TagNode”: “11437(us)” | “props”: [ |
| | | | }, | “_dst”, |
| | | | “total”: “219644(us)”, | “_rank”, |
| | | | “vertices”: 499 | “_type”, |
| | | | }, | “first_guarantee_amount”, |
| | | | { | “from_uid”, |
| | | | “exec”: “478631(us)”, | “latest_guarantee_amount”, |
| | | | “host”: “10.66.36.85:9779”, | “to_uid” |
| | | | “storage_detail”: { | ], |
| | | | “GetNeighborsNode”: “1114172(us)”, | “type”: -18 |
| | | | “HashJoinNode”: “299513(us)”, | }, |
| | | | “RelNode”: “1114251(us)”, | { |
| | | | “SingleEdgeNode”: “278129(us)”, | “props”: [ |
| | | | “TagNode”: “16430(us)” | “_dst”, |
| | | | }, | “_rank”, |
| | | | “total”: “1031400(us)”, | “_type”, |
| | | | “vertices”: 536 | “company_uid”, |
| | | | }, | “end_dt”, |
| | | | { | “person_nm”, |
| | | | “exec”: “55898(us)”, | “person_uid”, |
| | | | “host”: “10.66.36.53:9779”, | “position”, |
| | | | “storage_detail”: { | “start_dt” |
| | | | “GetNeighborsNode”: “531280(us)”, | ], |
| | | | “HashJoinNode”: “240111(us)”, | “type”: -25 |
| | | | “RelNode”: “531354(us)”, | }, |
| | | | “SingleEdgeNode”: “224118(us)”, | { |
| | | | “TagNode”: “11737(us)” | “props”: [ |
| | | | }, | “_dst”, |
| | | | “total”: “231031(us)”, | “_rank”, |
| | | | “vertices”: 510 | “_type”, |
| | | | } | “company_uid”, |
| | | | ], | “holder_name”, |
| | | | “totalTime”: “140375599(us)”, | “holder_type”, |
| | | | “version”: 0 | “holder_uid”, |
| | | | } | “paid_capital_amt”, |
| | | | | “pledge_ratio”, |
| | | | | “sharehd_num”, |
| | | | | “subscribed_capital_amt”, |
| | | | | “subscribed_capital_amt_conv” |
| | | | | ], |
| | | | | “type”: -24 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: -7 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “case_no”, |
| | | | | “case_type”, |
| | | | | “event_id”, |
| | | | | “first_uid”, |
| | | | | “second_uid”, |
| | | | | “title”, |
| | | | | “type” |
| | | | | ], |
| | | | | “type”: -15 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “leave_dt”, |
| | | | | “name”, |
| | | | | “person_uid”, |
| | | | | “position”, |
| | | | | “start_dt” |
| | | | | ], |
| | | | | “type”: -11 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “address”, |
| | | | | “first_uid”, |
| | | | | “rule_code”, |
| | | | | “second_uid” |
| | | | | ], |
| | | | | “type”: -13 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “email”, |
| | | | | “first_uid”, |
| | | | | “phone”, |
| | | | | “rule_code”, |
| | | | | “second_uid” |
| | | | | ], |
| | | | | “type”: -14 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_type”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: -10 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “rpt”, |
| | | | | “supplier_name”, |
| | | | | “supplier_uid” |
| | | | | ], |
| | | | | “type”: -16 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “data_type”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: -9 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “data_type”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_type”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: 8 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “from_uid”, |
| | | | | “real_type”, |
| | | | | “to_uid”, |
| | | | | “turnover” |
| | | | | ], |
| | | | | “type”: 21 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “first_loan_amount”, |
| | | | | “from_uid”, |
| | | | | “latest_loan_amount”, |
| | | | | “latest_repayment_amount”, |
| | | | | “latest_repayment_date”, |
| | | | | “repayment_sum_amount”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 17 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “branch_org_uid”, |
| | | | | “company_uid” |
| | | | | ], |
| | | | | “type”: 12 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “amount”, |
| | | | | “currency”, |
| | | | | “from_uid”, |
| | | | | “inc_type”, |
| | | | | “prod_name”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 23 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “amount”, |
| | | | | “from_uid”, |
| | | | | “ratio”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 22 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “equity_amount”, |
| | | | | “from_uid”, |
| | | | | “reg_date”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 20 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “from_uid”, |
| | | | | “pledge_amount”, |
| | | | | “pledge_ratio”, |
| | | | | “start_date”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 19 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “first_guarantee_amount”, |
| | | | | “from_uid”, |
| | | | | “latest_guarantee_amount”, |
| | | | | “to_uid” |
| | | | | ], |
| | | | | “type”: 18 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “end_dt”, |
| | | | | “person_nm”, |
| | | | | “person_uid”, |
| | | | | “position”, |
| | | | | “start_dt” |
| | | | | ], |
| | | | | “type”: 25 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “holder_name”, |
| | | | | “holder_type”, |
| | | | | “holder_uid”, |
| | | | | “paid_capital_amt”, |
| | | | | “pledge_ratio”, |
| | | | | “sharehd_num”, |
| | | | | “subscribed_capital_amt”, |
| | | | | “subscribed_capital_amt_conv” |
| | | | | ], |
| | | | | “type”: 24 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: 7 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “case_no”, |
| | | | | “case_type”, |
| | | | | “event_id”, |
| | | | | “first_uid”, |
| | | | | “second_uid”, |
| | | | | “title”, |
| | | | | “type” |
| | | | | ], |
| | | | | “type”: 15 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “leave_dt”, |
| | | | | “name”, |
| | | | | “person_uid”, |
| | | | | “position”, |
| | | | | “start_dt” |
| | | | | ], |
| | | | | “type”: 11 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “address”, |
| | | | | “first_uid”, |
| | | | | “rule_code”, |
| | | | | “second_uid” |
| | | | | ], |
| | | | | “type”: 13 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “email”, |
| | | | | “first_uid”, |
| | | | | “phone”, |
| | | | | “rule_code”, |
| | | | | “second_uid” |
| | | | | ], |
| | | | | “type”: 14 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_type”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: 10 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “rpt”, |
| | | | | “supplier_name”, |
| | | | | “supplier_uid” |
| | | | | ], |
| | | | | “type”: 16 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_dst”, |
| | | | | “_rank”, |
| | | | | “_type”, |
| | | | | “company_uid”, |
| | | | | “data_type”, |
| | | | | “holder_name”, |
| | | | | “holder_pct”, |
| | | | | “holder_uid” |
| | | | | ], |
| | | | | “type”: 9 |
| | | | | } |
| | | | | ] |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 2 | Dedup | 1 | { | outputVar: { |
| | | | “execTime”: “8(us)”, | “colNames”: [ |
| | | | “rows”: 1, | “_vid” |
| | | | “totalTime”: “11(us)”, | ], |
| | | | “version”: 0 | “type”: “DATASET”, |
| | | | } | “name”: “__Dedup_2” |
| | | | | } |
| | | | | inputVar: __VAR_0 |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 1 | PassThrough | 0 | { | outputVar: { |
| | | | “execTime”: “10(us)”, | “colNames”: , |
| | | | “rows”: 0, | “type”: “DATASET”, |
| | | | “totalTime”: “13(us)”, | “name”: “__PassThrough_1” |
| | | | “version”: 0 | } |
| | | | } | inputVar: |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 0 | Start | | { | outputVar: { |
| | | | “execTime”: “0(us)”, | “colNames”: , |
| | | | “rows”: 0, | “type”: “DATASET”, |
| | | | “totalTime”: “16(us)”, | “name”: “__Start_0” |
| | | | “version”: 0 | } |
| | | | } | |
-----±------------±-------------±--------------------------------------------------±-----------------------------------------
| 3 | Dedup | 1 | { | outputVar: { |
| | | | “execTime”: “5(us)”, | “colNames”: [ |
| | | | “rows”: 1, | “_vid” |
| | | | “totalTime”: “8(us)”, | ], |
| | | | “version”: 0 | “type”: “DATASET”, |
| | | | } | “name”: “__Dedup_3” |
| | | | | } |
| | | | | inputVar: __VAR_1 |
-----±------------±-------------±--------------------------------------------------±----------------------------------------