[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391785#comment-17391785
 ] 

ASF subversion and git services commented on ASTERIXDB-2924:
------------------------------------------------------------

Commit dd99b2445416be08591713563787cc8dedebc8f5 in asterixdb's branch 
refs/heads/master from ggalvizo
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=dd99b24 ]

[ASTERIXDB-2924][IDX] Multiple INLJs are now recognized.

- user mode changes: no
- storage format changes: no
- interface changes: no

WLOG, two datasets that can be optimized with an INLJ using the same
probe are now recognized and transformed into a double INLJ plan.

Change-Id: I1da6174b07963ec611677d7906c7304c46a2a382
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/12424
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>


> Ternary joins with same probe using INLJ
> ----------------------------------------
>
>                 Key: ASTERIXDB-2924
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2924
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: IDX - Indexes
>            Reporter: Glenn Justo Galvizo
>            Assignee: Glenn Justo Galvizo
>            Priority: Major
>             Fix For: 0.9.7
>
>
> Given the DDLs:
> {code:java}
> DROP DATAVERSE    TestDataverse IF EXISTS;
> CREATE DATAVERSE  TestDataverse;
> USE               TestDataverse;
> CREATE TYPE       GenericType AS { _id: bigint, c : bigint };
> CREATE DATASET    IndexDatasetA (GenericType)
> PRIMARY KEY       _id;
> CREATE DATASET    IndexDatasetB (GenericType)
> PRIMARY KEY       _id;
> CREATE DATASET    ProbeDataset (GenericType)
> PRIMARY KEY       _id;
> CREATE INDEX      indexA
> ON                IndexDatasetA (k : int);
> CREATE INDEX      indexB
> ON                IndexDatasetB (k : int);{code}
> The following ternary join query produces an INLJ plan for both indexed 
> datasets. The join field from the probe is the probe dataset's primary key.
> {code:java}
> --                Query 1, ternary join w/ primary key on probe.
> FROM              ProbeDataset P,
>                   IndexDatasetA A,
>                   IndexDatasetB B
> WHERE             P._id /* +indexnl */ = A.k AND
>                   P._id /* +indexnl */ = B.k
> SELECT            COUNT(*);{code}
> The following ternary join query produces an INLJ plan for only the left-most 
> indexed dataset. The join field from the probe is a closed field from the 
> probe dataset.
> {code:java}
> --                Query 2, ternary join w/ closed field on probe.
> FROM              ProbeDataset P,
>                   IndexDatasetA A,
>                   IndexDatasetB B
> WHERE             P.c /* +indexnl */ = A.k AND
>                   P.c /* +indexnl */ = B.k
> SELECT            COUNT(*);
> {code}
> Both queries should produce two INLJs.



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

Reply via email to