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

skip range scan index selection choosing longest matching index

    XMLWordPrintable

Details

    • Untriaged
    • Yes

    Description

      Create default bucket

      Insert docs like the following:

      {a:100, d:200}

      create 4 indexes:

      create index idx1 on default(a, d);
      create index idx2 on default(a, b, d);
      create index idx3 on default(a, b, c, d);
      create index idx4 on default(a, b, c, d, e);

      run queries:

      select * from default where a > 0 and d > 0;
      select a, d from default where a > 0 and d > 0;

      In both cases idx3 will be selected which results in unnecessary extra work

      Attachments

        Issue Links

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

          Activity

            People

              ajay.bhullar Ajay Bhullar
              korrigan.clark Korrigan Clark (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty