You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/08/29 08:09:00 UTC
[jira] [Updated] (IGNITE-8579) SQL: Unicast request with LIMIT
should skip merge table if possible
[ https://issues.apache.org/jira/browse/IGNITE-8579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Ozerov updated IGNITE-8579:
------------------------------------
Fix Version/s: (was: 2.7)
> SQL: Unicast request with LIMIT should skip merge table if possible
> -------------------------------------------------------------------
>
> Key: IGNITE-8579
> URL: https://issues.apache.org/jira/browse/IGNITE-8579
> Project: Ignite
> Issue Type: Task
> Components: sql
> Affects Versions: 2.5
> Reporter: Vladimir Ozerov
> Priority: Major
> Labels: performance
>
> *Problem*
> We have two cases when request could be executed only over a single partition:
> 1) With explicit partition
> 2) When partition pruning optimization reduced request to a single partition (IGNITE-4509). E.g. if {{department_id}} is affinity key in the query below:
> {code}
> SELECT * FROM emp WHERE department_id=? LIMIT 50;
> {code}
> In both cases we need to ensure that instead of fully-fledged two-step execution, we perform only map request, and reduce phase is skipped. I.e. {{org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery#skipMergeTbl}} is resolved to true.
> *Reproducer*
> The following query reproduces a situation when this is not the case at the moment, and merge table is initialized
> {code}
> CREATE TABLE emp (pk_id BIGINT, dept_ID BIGINT, name VARCHAR, PRIMARY KEY(pk_id, dept_id) WITH "AFFINITY_KEY=dept_id";
> SELECT * FROM emp WHERE dept_id=? LIMIT 10
> {code}
> Notice that reduce phase exists, while in reality it is not needed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)