wey
10/11/2022, 1:55 AM(root@nebula) [basketballplayer]> explain match (v:player) where v.player.name in ["Tim Duncan"] return v limit 1
Execution succeeded (time spent 940/6819 us)
Execution Plan (optimize time 328 us)
...
-----+----------------+--------------+----------------+-----------------------------------------------
| 1 | IndexScan | 2 | | outputVar: { |
| | | | | "colNames": [ |
| | | | | "_vid" |
| | | | | ], |
| | | | | "type": "DATASET", |
| | | | | "name": "__IndexScan_1" |
| | | | | } |
| | | | | inputVar: |
| | | | | space: 49 |
| | | | | dedup: false |
| | | | | limit: 9223372036854775807 |
| | | | | filter: |
| | | | | orderBy: [] |
| | | | | schemaId: 50 |
| | | | | isEdge: false |
| | | | | returnCols: [ |
| | | | | "_vid" |
| | | | | ] |
| | | | | indexCtx: [ |
| | | | | { |
| | | | | "columnHints": [], |
| | | | | "filter": "", |
| | | | | "index_id": 54 |
| | | | | } |
| | | | | ] |
-----+----------------+--------------+----------------+-----------------------------------------------
...
(root@nebula) [basketballplayer]> explain match (v:player) where v.player.name == "Tim Duncan" return v limit 1
Execution succeeded (time spent 1069/6613 us)
...
| | | | | if_track_previous_path: false |
-----+----------------+--------------+----------------+-------------------------------------------
| 8 | IndexScan | 2 | | outputVar: { |
| | | | | "colNames": [ |
| | | | | "_vid" |
| | | | | ], |
| | | | | "type": "DATASET", |
| | | | | "name": "__IndexScan_1" |
| | | | | } |
| | | | | inputVar: |
| | | | | space: 49 |
| | | | | dedup: false |
| | | | | limit: 9223372036854775807 |
| | | | | filter: |
| | | | | orderBy: [] |
| | | | | schemaId: 50 |
| | | | | isEdge: false |
| | | | | returnCols: [ |
| | | | | "_vid" |
| | | | | ] |
| | | | | indexCtx: [ |
| | | | | { |
| | | | | "columnHints": [ |
| | | | | { |
| | | | | "includeEnd": false, |
| | | | | "includeBegin": true, |
| | | | | "endValue": "__EMPTY__", |
| | | | | "beginValue": "Tim Duncan", |
| | | | | "scanType": "PREFIX", |
| | | | | "column": "name" |
| | | | | } |
| | | | | ], |
| | | | | "filter": "", |
| | | | | "index_id": 55 |
| | | | | } |
| | | | | ] |
-----+----------------+--------------+----------------+-------------------------------------------
The mitigation now is to use ==
instead of IN
I had reported this https://github.com/vesoft-inc/nebula/issues/4708
Thanks!