Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.0, 7.1.0, 7.2.1
-
Untriaged
-
0
-
Unknown
Description
Analysis from Donald Haggart
CREATE INDEX ix10 ON default(c1);
|
SELECT t3.c2
|
FROM default AS t1
|
JOIN (SELECT d.c2
|
FROM default AS d
|
WHERE d.c1 > 0 ) AS t2 ON t1.c2 = t2.c2
|
JOIN default t3 ON t2.c2 = META(t3).xattrs._sync.rev
|
WHERE t1.c1 < 0 AND t3.c1 > 0 ;
|
EXPLAIN SELECT t3.c2 FROM default AS t1 JOIN (SELECT d.c2 FROM default AS d WHERE d.c1 > 0 ) AS t2 ON t1.c2 = t2.c2 JOIN default t3 ON t2.c2 = META(t3).xattrs._sync.rev WHERE t1.c1 < 0 AND t3.c1 > 0 ;
|
{
|
"requestID": "01e4a742-2eb6-4bdb-8851-cd33236b303e",
|
"signature": "json",
|
"results": [
|
{
|
"plan": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexScan3",
|
"as": "t1",
|
"index": "ix10",
|
"index_id": "f535077161f1fd60",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "default",
|
"namespace": "default",
|
"spans": [
|
{
|
"exact": true,
|
"range": [
|
{
|
"high": "0",
|
"inclusion": 0,
|
"index_key": "`c1`",
|
"low": "null"
|
}
|
]
|
}
|
],
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"as": "t1",
|
"keyspace": "default",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"alias": "t1",
|
"condition": "((`t1`.`c1`) \u003c 0)"
|
}
|
]
|
}
|
},
|
{
|
"#operator": "HashJoin",
|
"build_aliases": [
|
"t2"
|
],
|
"build_exprs": [
|
"(`t2`.`c2`)"
|
],
|
"on_clause": "((`t1`.`c2`) = (`t2`.`c2`))",
|
"probe_exprs": [
|
"(`t1`.`c2`)"
|
],
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexScan3",
|
"as": "d",
|
"index": "ix10",
|
"index_id": "f535077161f1fd60",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "default",
|
"namespace": "default",
|
"spans": [
|
{
|
"exact": true,
|
"range": [
|
{
|
"inclusion": 0,
|
"index_key": "`c1`",
|
"low": "0"
|
}
|
]
|
}
|
],
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"as": "d",
|
"keyspace": "default",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"condition": "(0 \u003c (`d`.`c1`))"
|
},
|
{
|
"#operator": "InitialProject",
|
"discard_original": true,
|
"result_terms": [
|
{
|
"expr": "(`d`.`c2`)"
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
},
|
{
|
"#operator": "Alias",
|
"as": "t2",
|
"secondary_term": true
|
}
|
]
|
}
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "NestedLoopJoin",
|
"alias": "t3",
|
"on_clause": "((`t2`.`c2`) = (((meta(`t3`).`xattrs`).`_sync`).`rev`))",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "IndexScan3",
|
"as": "t3",
|
"index": "ix10",
|
"index_id": "f535077161f1fd60",
|
"index_projection": {
|
"primary_key": true
|
},
|
"keyspace": "default",
|
"namespace": "default",
|
"nested_loop": true,
|
"spans": [
|
{
|
"exact": true,
|
"range": [
|
{
|
"inclusion": 0,
|
"index_key": "`c1`",
|
"low": "0"
|
}
|
]
|
}
|
],
|
"using": "gsi"
|
},
|
{
|
"#operator": "Fetch",
|
"as": "t3",
|
"keyspace": "default",
|
"namespace": "default",
|
"nested_loop": true
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Filter",
|
"alias": "t3",
|
"condition": "(0 \u003c (`t3`.`c1`))"
|
}
|
]
|
}
|
}
|
]
|
}
|
},
|
{
|
"#operator": "InitialProject",
|
"discard_original": true,
|
"preserve_order": true,
|
"result_terms": [
|
{
|
"expr": "(`t3`.`c2`)"
|
}
|
]
|
}
|
]
|
}
|
}
|
]
|
},
|
"text": "SELECT t3.c2 FROM default AS t1 JOIN (SELECT d.c2 FROM default AS d WHERE d.c1 \u003e 0 ) AS t2 ON t1.c2 = t2.c2 JOIN default t3 ON t2.c2 = META(t3).xattrs._sync.rev WHERE t1.c1 \u003c 0 AND t3.c1 \u003e 0;"
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "2.692464ms",
|
"executionTime": "2.614304ms",
|
"resultCount": 1,
|
"resultSize": 9819,
|
"serviceLoad": 2
|
}
|
}
|
t3 Fetch must have
"subpaths": [
|
"_sync"
|
]
|
Attachments
For Gerrit Dashboard: MB-57781 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
193605,2 | MB-57781 Proper save/restore this.node on builder | master | query | Status: MERGED | +2 | +1 |
193641,2 | MB-57781 Proper save/restore this.node on builder | neo | query | Status: MERGED | +2 | +1 |
196332,2 | MB-57781 Modify fix | master | query | Status: MERGED | +2 | +1 |