Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full indexscan without columnHints for where v.player.name in ["Tim Duncan"] #4708

Closed
wey-gu opened this issue Oct 11, 2022 · 0 comments
Closed
Assignees
Labels
severity/minor Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Oct 11, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

The indexscan is without any column-hint info, thus will lead full data scan.

In large clusters, the result is exhausting memories of all storage nodes.

See details in the slack discussion attached at the bottom.

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:


(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                       |
|    |                |              |                |   }                                      |
|    |                |              |                | ]                                        |
-----+----------------+--------------+----------------+-------------------------------------------

Expected behavior

Include column hint in indexscan, too.

Additional context

@wey-gu wey-gu added the type/bug Type: something is unexpected label Oct 11, 2022
@wey-gu wey-gu changed the title Memory issue in one query(due to full indexscan without columnHints) Memory issue in one query(due to full indexscan without columnHints) for where v.player.name in ["Tim Duncan"] Oct 11, 2022
@wey-gu wey-gu changed the title Memory issue in one query(due to full indexscan without columnHints) for where v.player.name in ["Tim Duncan"] full indexscan without columnHints for where v.player.name in ["Tim Duncan"] Oct 11, 2022
@Sophie-Xie Sophie-Xie added this to the v3.3.0 milestone Oct 11, 2022
@jinyingsunny jinyingsunny added the severity/minor Severity of bug label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants