You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Glenn Justo Galvizo (Jira)" <ji...@apache.org> on 2021/09/14 20:51:00 UTC

[jira] [Created] (ASTERIXDB-2965) Predicate with constant on join query for array indexes prevents acceleration

Glenn Justo Galvizo created ASTERIXDB-2965:
----------------------------------------------

             Summary: Predicate with constant on join query for array indexes prevents acceleration
                 Key: ASTERIXDB-2965
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2965
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: IDX - Indexes
            Reporter: Glenn Justo Galvizo
            Assignee: Glenn Justo Galvizo


*Found with RQG.

Specifying a constant on an indexed field along with a join on that same indexed field prevents INLJ acceleration.
{code:java}
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;{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)