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

adhoc query index selection issue with LIKE as index condition and query parameters

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Yes

    Description

       

      create index ix2 on default(c1) WHERE type LIKE "airport%";
      \set -$type "airport%";
      EXPLAIN SELECT 1 FROM default WHERE c1 = 10 AND type LIKE $type;
      

       

       

      Above adhoc query does n't choose the index. 

      Following works.

       

      EXPLAIN SELECT 1 FROM default WHERE c1 = 10 AND type LIKE "airport%";

       

       DNF transformation might not happened LIKE before index selection.

      Attachments

        Issue Links

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

          Activity

            AFAIK, there is no plan for a RC3.

            Wayne Siu Raju Suravarjjala - are we accepting more defects into 7.0.4?

            kamini.jagtiani Kamini Jagtiani (Inactive) added a comment - AFAIK, there is no plan for a RC3. Wayne Siu Raju Suravarjjala - are we accepting more defects into 7.0.4?

            Build couchbase-server-7.2.0-1140 contains query commit 2922274 with commit message:
            MB-52090 Compare with original index condition for index eligibility

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.2.0-1140 contains query commit 2922274 with commit message: MB-52090 Compare with original index condition for index eligibility

            Can we please have a 6.6 backport created for tracking?

            malarky Chris Malarky added a comment - Can we please have a 6.6 backport created for tracking?

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty