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/07/29 20:40:00 UTC
[jira] [Resolved] (ASTERIXDB-2924) Ternary joins with same probe
using INLJ
[ https://issues.apache.org/jira/browse/ASTERIXDB-2924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Glenn Justo Galvizo resolved ASTERIXDB-2924.
--------------------------------------------
Fix Version/s: 0.9.7
Resolution: Fixed
> 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)