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

[BP to 6.6.2] Primary index scan used with query with OR condition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.6.2
    • 6.6.0, 6.6.1
    • query
    • Untriaged
    • 1
    • Yes

    Description

      create primary index on default;

      create index ix1 on default(c1) where meta().id like "abc%";

      create index ix2 on default(c2) where meta().id like "abc%";

      create index ix3 on default(c3) where meta().id like "abc%";

       

      explain select * from default where meta().id like "abc%" and (c1 = 1 or c2 = 2 or c3 = 3);

       

      in 6.0 a union scan with ix1/ix2/ix3 is used, in 6.6.0 and later primary index scan is used. 

      Attachments

        Issue Links

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

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              bingjie.miao Bingjie Miao
              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