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

Unnest scan does not work when UNNEST is mixed with ANSI JOIN

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      Unnest scan can be used when there is an UNNEST in the query and appropriate array index exists with the array index key as the first index key. However, when UNNEST is used together with ANSI JOIN, unnest scan does not work properly. For example:

      CREATE INDEX purch_arrProduct_customerId on purchase(DISTINCT ARRAY pd.product FOR pd IN lineItems END, customerId);

      CREATE INDEX prod_productId on product(productId);

      explain SELECT count FROM purchase p UNNEST p.lineItems AS pd JOIN product pt ON pd.product = pt.productId WHERE pd.product LIKE "product33%";

      The relevant keyspaces can be created using test/multistore/bucket_create.sh 100

      Attachments

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

        Activity

          People

            bingjie.miao Bingjie Miao
            bingjie.miao Bingjie Miao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty