Description
We use number of use keys as maxParallelism. But we already do BulkGet() from KV i think we should make it default to 0 and let execution time decide it.
https://github.com/couchbase/query/blob/master/planner/build_scan.go#L28
explain select meta().id from default use keys ["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"];
|
{
|
"requestID": "2c461ebc-bdb9-4d2c-a20a-2ea887e9ec0d",
|
"signature": "json",
|
"results": [
|
{
|
"plan": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "KeyScan",
|
"keys": "[\"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\", \"1\"]"
|
},
|
{
|
"#operator": "Fetch",
|
"keyspace": "default",
|
"namespace": "default"
|
},
|
{
|
"#operator": "Parallel",
|
"maxParallelism": 30,
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "InitialProject",
|
"result_terms": [
|
{
|
"expr": "(meta(`default`).`id`)"
|
}
|
]
|
},
|
{
|
"#operator": "FinalProject"
|
}
|
]
|
}
|
}
|
]
|
},
|
"text": "select meta().id from default use keys [\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\"];"
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "1.444099ms",
|
"executionTime": "1.415513ms",
|
"resultCount": 1,
|
"resultSize": 1753
|
}
|
}
|
Attachments
For Gerrit Dashboard: MB-21332 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
68657,2 | MB-21332 adjust maxParallelism for USE KEYS | master | query | Status: MERGED | +2 | +1 |
68659,2 | MB-21332 adjust maxParallelism for USE KEYS | watson | query | Status: MERGED | +2 | +1 |