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

            bingjie.miao Bingjie Miao created issue -
            bingjie.miao Bingjie Miao made changes -
            Field Original Value New Value
            Link This issue Clones MB-52090 [ MB-52090 ]
            bingjie.miao Bingjie Miao made changes -
            Link This issue is caused by MB-33009 [ MB-33009 ]
            bingjie.miao Bingjie Miao made changes -
            Link This issue is triggered by CBSE-11939 [ CBSE-11939 ]
            bingjie.miao Bingjie Miao made changes -
            Assignee Pierre Regazzoni [ JIRAUSER25157 ] Bingjie Miao [ bingjie.miao ]
            kamini.jagtiani Kamini Jagtiani (Inactive) made changes -
            Fix Version/s Morpheus [ 17651 ]
            Fix Version/s 7.0.4 [ 18322 ]
            Fix Version/s 7.1.1 [ 18320 ]
            bingjie.miao Bingjie Miao made changes -
            Labels candidate-for-7.1.1
            kamini.jagtiani Kamini Jagtiani (Inactive) made changes -
            Summary [BP to 7.0.4] - adhoc query index selection issue with LIKE as index condition and query parameters [BP to 7.0.4,7.1.1] - adhoc query index selection issue with LIKE as index condition and query parameters
            wayne Wayne Siu made changes -
            Link This issue is a backport of MB-52090 [ MB-52090 ]
            wayne Wayne Siu made changes -
            Labels approved-for-7.0.4 approved-for-7.1.1
            wayne Wayne Siu made changes -
            Link This issue Clones MB-52090 [ MB-52090 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-48997 [ MB-48997 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-51648 [ MB-51648 ]

            Build couchbase-server-7.1.1-3063 contains query commit b2ed5c7 with commit message:
            MB-52161 Compare with original index condition for index eligibility

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.1-3063 contains query commit b2ed5c7 with commit message: MB-52161 Compare with original index condition for index eligibility

            Build couchbase-server-7.0.4-7274 contains query commit 93e3bc9 with commit message:
            MB-52161 Compare with original index condition for index eligibility

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.4-7274 contains query commit 93e3bc9 with commit message: MB-52161 Compare with original index condition for index eligibility
            bingjie.miao Bingjie Miao made changes -
            Assignee Bingjie Miao [ bingjie.miao ] Pierre Regazzoni [ JIRAUSER25157 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            pierre.regazzoni Pierre Regazzoni made changes -
            Assignee Pierre Regazzoni [ JIRAUSER25157 ] Ajay Bhullar [ ajay.bhullar ]
            lynn.straus Lynn Straus made changes -
            Affects Version/s 7.1.0.x [ 18356 ]
            ajay.bhullar Ajay Bhullar added a comment -

            verified in 7.0.4-7275, also regression is running cleanly.

            ajay.bhullar Ajay Bhullar added a comment - verified in 7.0.4-7275, also regression is running cleanly.

            verified in 7.1.1-3063

            ajay.bhullar Ajay Bhullar added a comment - verified in 7.1.1-3063
            ajay.bhullar Ajay Bhullar made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-52510 [ MB-52510 ]
            lynn.straus Lynn Straus made changes -
            Link This issue blocks MB-51648 [ MB-51648 ]

            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