Details
-
Bug
-
Resolution: Duplicate
-
Major
-
5.0.0, 5.5.3, 6.0.1, 6.5.0
-
None
-
Untriaged
-
Unknown
Description
Adaptive index never indexes document key. The following query using document key for indexscan which result in 0 rows.
CREATE INDEX report ON default(distinct pairs(self)) ; |
EXPLAIN SELECT * FROM default AS d WHERE meta(d).id="report_0000"; |
{
|
"plan": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "DistinctScan", |
"scan": { |
"#operator": "IndexScan3", |
"as": "d", |
"index": "report", |
"index_id": "a1c30bd5256a6c51", |
"index_projection": { |
"primary_key": true |
},
|
"keyspace": "default", |
"namespace": "default", |
"spans": [ |
{
|
"exact": true, |
"range": [ |
{
|
"high": "[\"id\", \"report_0000\"]", |
"inclusion": 3, |
"low": "[\"id\", \"report_0000\"]" |
}
|
]
|
}
|
],
|
"using": "gsi" |
}
|
},
|
{
|
"#operator": "Fetch", |
"as": "d", |
"keyspace": "default", |
"namespace": "default" |
},
|
{
|
"#operator": "Parallel", |
"~child": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "Filter", |
"condition": "((meta(`d`).`id`) = \"report_0000\")" |
},
|
{
|
"#operator": "InitialProject", |
"result_terms": [ |
{
|
"expr": "self", |
"star": true |
}
|
]
|
},
|
{
|
"#operator": "FinalProject" |
}
|
]
|
}
|
}
|
]
|
},
|
"text": "SELECT * FROM default AS d WHERE meta(d).id=\"report_0000\";" |
}
|
],
|
"status": "success", |
"metrics": { |
"elapsedTime": "5.98893ms", |
"executionTime": "5.929722ms", |
"resultCount": 1, |
"resultSize": 2459 |
}
|
Attachments
Issue Links
- links to