You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maxim Muzafarov (Jira)" <ji...@apache.org> on 2019/10/08 11:20:00 UTC

[jira] [Updated] (IGNITE-11019) SQL: explain plan of a simple query contains merge table

     [ https://issues.apache.org/jira/browse/IGNITE-11019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maxim Muzafarov updated IGNITE-11019:
-------------------------------------
    Fix Version/s:     (was: 2.8)
                   2.9

> SQL: explain plan of a simple query contains merge table
> --------------------------------------------------------
>
>                 Key: IGNITE-11019
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11019
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Alexander Lapin
>            Priority: Major
>             Fix For: 2.9
>
>
> In case of simple* query like following "select * from Organization org where org._KEY = 1 or org._KEY = 2" explain plan will contain merge table despite the fact that it's skipped within regular query flow.
> {code:java|title=GridReduceQueryExecutor#query}
> final boolean skipMergeTbl = !qry.explain() && qry.skipMergeTable()
> {code}
> Explain plan output:
> ____ : [SELECT
>     ORG__Z0.NAME AS __C0_0,
>     ORG__Z0.DEBTCAPITAL AS __C0_1,
>     ORG__Z0.ID AS __C0_2
> FROM "orgBetweenTest".ORGANIZATION ORG__Z0
>     /* "orgBetweenTest"."_key_PK": _KEY IN(1, 2) */
> WHERE ORG__Z0._KEY IN(1, 2)]
> ____ : [SELECT
>     __C0_0 AS NAME,
>     __C0_1 AS DEBTCAPITAL,
>     __C0_2 AS ID
> FROM PUBLIC.__T0
>     /* "orgBetweenTest"."merge_scan" */]
> *simple query by means of GridSqlQuery#simpleQuery



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