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

Array index-nested loop join w/ quantification

    XMLWordPrintable

Details

    Description

      Copy of ASTERIXDB-2921.

      The following query should be optimized, but currently isn't:

      SET `compiler.arrayindex` "true";
       
      DROP DATAVERSE TestYelp IF EXISTS;
      CREATE DATAVERSE TestYelp;
      USE TestYelp;
       
      CREATE TYPE CheckinType AS { checkin_id: uuid  };
      CREATE TYPE CheckinDatesToMarkersType AS { marker: string };
       
      CREATE DATASET YelpCheckin(CheckinType) PRIMARY KEY checkin_id AUTOGENERATED;
      CREATE DATASET YelpCheckinDateMarkers (CheckinDatesToMarkersType) PRIMARY KEY marker;
      CREATE INDEX IdxYelpCheckinDates ON YelpCheckin (UNNEST dates : string);
       
      FROM    YelpCheckinDateMarkers M, YelpCheckin C
      WHERE   TO_STRING(M.datetime) /*+ indexnl */ IN C.dates AND 
              C.business_id = "--Ni3oJ4VOqfOEu7Sj2Vzg"
      SELECT  COUNT(*);
      

      Attachments

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

        Activity

          People

            glenn.galvizo Glenn Galvizo
            glenn.galvizo Glenn Galvizo
            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