You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (JIRA)" <ji...@apache.org> on 2019/01/22 08:23:00 UTC

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

Alexander Lapin created IGNITE-11019:
----------------------------------------

             Summary: 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: Bug
          Components: sql
            Reporter: Alexander Lapin
             Fix For: 2.8


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
(v7.6.3#76005)