版本:3.6.0
单机,用tar.gz安装
分另创建TAG ipranwy、oltwy、otnwy,还有公共的TAG wy,创建时分别用ipranwy、oltwy、otnwy和wy组合创建不同类型的点,在wy上填公共属性如IP。wy.ipdz上创建了索引。
插入1800万测试数据。
这样查询没问题:
这样查询也没问题:
但加上条件就查不出结果:
这是什么原因,有办法解决吗?
版本:3.6.0
单机,用tar.gz安装
分另创建TAG ipranwy、oltwy、otnwy,还有公共的TAG wy,创建时分别用ipranwy、oltwy、otnwy和wy组合创建不同类型的点,在wy上填公共属性如IP。wy.ipdz上创建了索引。
插入1800万测试数据。
这样查询没问题:
看下explain?感觉是最后一个没下推 limit 导致
执行计划如下:
(root@nebula) [knowledge_graph9]> explain match (v:wy:ipranwy) where v.wy.IPdz==‘83.10.136.138’ return v limit 10;
Execution succeeded (time spent 800µs/1.258988ms)
Execution Plan (optimize time 381 us)
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| id | name | dependencies | profiling data | operator info |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 15 | Project | 14 | | outputVar: { |
| | | | | “colNames”: [ |
| | | | | “v” |
| | | | | ], |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__Limit_8” |
| | | | | } |
| | | | | inputVar: __Limit_14 |
| | | | | columns: [ |
| | | | | “$v” |
| | | | | ] |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 14 | Limit | 6 | | outputVar: { |
| | | | | “colNames”: [ |
| | | | | “v” |
| | | | | ], |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__Limit_14” |
| | | | | } |
| | | | | inputVar: __Filter_6 |
| | | | | offset: 0 |
| | | | | count: 10 |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 6 | Filter | 12 | | outputVar: { |
| | | | | “colNames”: [ |
| | | | | “v” |
| | | | | ], |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__Filter_6” |
| | | | | } |
| | | | | inputVar: __Project_5 |
| | | | | condition: (v.wy.IPdz==“83.10.136.138”) |
| | | | | isStable: false |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 12 | AppendVertices | 13 | | outputVar: { |
| | | | | “colNames”: [ |
| | | | | “v” |
| | | | | ], |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__Project_5” |
| | | | | } |
| | | | | inputVar: __ScanVertices_13 |
| | | | | space: 119 |
| | | | | dedup: 1 |
| | | | | limit: -1 |
| | | | | filter: |
| | | | | orderBy: |
| | | | | src: $-._vid |
| | | | | props: [ |
| | | | | { |
| | | | | “props”: [ |
| | | | | “ID”, |
| | | | | “wymc”, |
| | | | | “wgbm”, |
| | | | | “IPdz”, |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 122 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “ID”, |
| | | | | “wymc”, |
| | | | | “wgbm”, |
| | | | | “IPdz”, |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 123 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “ID”, |
| | | | | “wymc”, |
| | | | | “wgbm”, |
| | | | | “IPdz”, |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 121 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “ID”, |
| | | | | “wymc”, |
| | | | | “wgbm”, |
| | | | | “IPdz”, |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 120 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “ID”, |
| | | | | “type”, |
| | | | | “wymc”, |
| | | | | “wgbm”, |
| | | | | “IPdz”, |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 124 |
| | | | | } |
| | | | | ] |
| | | | | exprs: |
| | | | | vertex_filter: |
| | | | | if_track_previous_path: false |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 13 | ScanVertices | 3 | | outputVar: { |
| | | | | “colNames”: [ |
| | | | | “_vid”, |
| | | | | “wy._tag”, |
| | | | | “ipranwy._tag” |
| | | | | ], |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__ScanVertices_13” |
| | | | | } |
| | | | | inputVar: |
| | | | | space: 119 |
| | | | | dedup: 0 |
| | | | | limit: -1 |
| | | | | filter: ((wy._tag IS NOT EMPTY AND ipranwy._tag IS NOT EMPTY) AND (wy._tag IS NOT EMPTY AND ipranwy._tag IS NOT EMPTY)) |
| | | | | orderBy: |
| | | | | props: [ |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 120 |
| | | | | }, |
| | | | | { |
| | | | | “props”: [ |
| | | | | “_tag” |
| | | | | ], |
| | | | | “tagId”: 123 |
| | | | | } |
| | | | | ] |
| | | | | exprs: |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
| 3 | Start | | | outputVar: { |
| | | | | “colNames”: , |
| | | | | “type”: “DATASET”, |
| | | | | “name”: “__Start_3” |
| | | | | } |
-----±---------------±-------------±---------------±-------------------------------------------------------------------------------------------------------------------------
Tue, 24 Dec 2024 11:23:08 CST
(root@nebula) [knowledge_graph9]>
此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。