Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-21332

maxParallelism for USE KEYS needs to be adjusted correctly

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.6.0, 5.0.0
    • 4.5.1
    • query
    • None

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Prerna.Manaktala Prerna Manaktala (Inactive)
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty