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

[BP to 7.0.4,7.1.1] - adhoc query index selection issue with LIKE as index condition and query parameters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.6.2, 7.0.0, 6.6.3, Morpheus, 7.1.0, 7.0.3, 7.0.2, 7.0.1, 6.6.5, 6.6.4, 7.1.1, 7.0.4
    • 7.1.1, 7.0.4
    • query
    • 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

            No work has yet been logged on this issue.

            People

              ajay.bhullar Ajay Bhullar
              bingjie.miao Bingjie Miao
              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