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

Query is not sargable to complex partitioned index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • No

    Description

      This is complex case, But would like to bring up issue (This is case Chubb POC reported, in POC customer OR clause values are consecutive, so replace with between).

      The following query is not sargable to ix4 and makes index unusable.

      create index ix4 on default(a,b) where (x=1 and (y=3 or y =4) and z = 2);
      explain select a from default where a is not missing and (x=1 and (y=3 or y =4) and z = 2);
      {
      "requestID": "09809569-c144-4b91-a563-22c2f398cdf6",
      "errors": [

      { "code": 4000, "msg": "No primary index on keyspace default. Use CREATE PRIMARY INDEX to create one." }

      ],
      "status": "fatal",
      "metrics":

      { "elapsedTime": "5.461913ms", "executionTime": "5.423896ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      Attachments

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

        Activity

          People

            gerald Gerald Sangudi (Inactive)
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty