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

META().id predicate is not included in spans shouldn't use index pushdowns

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.6.0, 5.0.0
    • 4.5.0, 4.5.1, 4.6.0, 5.0.0
    • query
    • None
    • Untriaged
    • Yes

    Description

      CREATE INDEX `def_type` ON `travel-sample`(`type`)

      SELECT count(1) as total FROM `travel-sample` where type='airline' AND meta().id = 'airline_10' ;

      {
          "requestID": "5967284e-fdc9-4241-9c38-f67f6c54b2cc",
          "clientContextID": "9d7f4e4c-be37-464a-8764-4be686e19453",
          "signature": "json",
          "results": [
              {
                  "plan": {
                      "#operator": "Sequence",
                      "~children": [
                          {
                              "#operator": "IndexCountScan",
                              "covers": [
                                  "cover ((`travel-sample`.`type`))",
                                  "cover ((meta(`travel-sample`).`id`))"
                              ],
                              "index": "def_type",
                              "index_id": "ec58d536d4295c3c",
                              "keyspace": "travel-sample",
                              "namespace": "default",
                              "spans": [
                                  {
                                      "Range": {
                                          "High": [
                                              "\"airline\""
                                          ],
                                          "Inclusion": 3,
                                          "Low": [
                                              "\"airline\""
                                          ]
                                      }
                                  }
                              ],
                              "using": "gsi"
                          },
                          {
                              "#operator": "IndexCountProject",
                              "result_terms": [
                                  {
                                      "as": "total",
                                      "expr": "count(1)"
                                  }
                              ]
                          }
                      ]
                  },
                  "text": "SELECT count(1) as total FROM `travel-sample` where type='airline' AND meta().id = 'airline_10' ;"
              }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "7.331953ms",
              "executionTime": "7.285829ms",
              "resultCount": 1,
              "resultSize": 1648
          }
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-21958
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty