Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2965

Predicate with constant on join query for composite atomic array indexes prevents acceleration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • IDX - Indexes
    • None

    Description

      *Found with RQG.

      Specifying a constant on an indexed field along with a join on that same indexed field prevents INLJ acceleration.

      USE TestDataverse;
      DROP DATASET IndexedDataset IF EXISTS;
       CREATE DATASET IndexedDataset (TestType)
       PRIMARY KEY _id AUTOGENERATED;
       CREATE INDEX testIndex ON IndexedDataset ( container_object_1.double_rand_4.contained_object_2: DOUBLE, ( UNNEST string_rand_26_c.contained_object_1 : STRING ) );
      
       SET `compiler.arrayindex` "true";
       USE TestDataverse;
       FROM ProbeDataset1 AS D2,
       IndexedDataset AS D1
       WHERE ( D1.container_object_1.double_rand_4.contained_object_2 /* +indexnl */ >= (TO_DOUBLE(D2.integer_rand_4) + 0.5) ) AND
       ( SOME V1 IN D1.string_rand_26_c.contained_object_1 SATISFIES ( V1 /* +indexnl */ <= CODEPOINT_TO_STRING([100 + D2.string_rand_26_c]) ) ) AND
       D1.container_object_1.double_rand_4.contained_object_2 = 2
       SELECT D1._id AS PK1, D2._id AS PK2
       ORDER BY D1._id, D2._id
       LIMIT 100;

       

      Attachments

        Activity

          People

            ggalvizo Glenn Justo Galvizo
            ggalvizo Glenn Justo Galvizo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: