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

Query not covered when query parameter avialble

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      CREATE INDEX ix20 ON default ( DISTINCT ARRAY r.bid FOR r IN responses END, _type, createdAt) ;
       
      EXPLAIN SELECT RAW meta().id
      FROM `default`
      WHERE `_type` = 'AppLead'
        AND `createdAt` >= '2019-08-28'
        AND ANY `item` IN `responses` SATISFIES `item`.`bid` = 'BidRegistration::1234' END;
       
      EXPLAIN SELECT RAW meta().id
      FROM `default`
      WHERE `_type` = $q1
        AND `createdAt` >= $q2
        AND ANY `item` IN `responses` SATISFIES `item`.`bid` = $q3 END;
       
      \set -$q1 'AppLead';
      \set -$q2 '2019-08-28';
      \set -$q3 'BidRegistration::1234';
       
      EXPLAIN SELECT RAW meta().id
      FROM `default`
      WHERE `_type` = $q1
        AND `createdAt` >= $q2
        AND ANY `item` IN `responses` SATISFIES `item`.`bid` = $q3 END;
      

      First 2 queries are covered . When query parameters are set and run query (adhoc=true) It is not choosing covering path when the Implicit Array index.

      Attachments

        Issue Links

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

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty