You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2015/09/18 17:21:04 UTC

[jira] [Created] (PHOENIX-2274) Sort-merge join could not optimize out the sort on the right table

Maryann Xue created PHOENIX-2274:
------------------------------------

             Summary: Sort-merge join could not optimize out the sort on the right table
                 Key: PHOENIX-2274
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2274
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.5.2
            Reporter: Maryann Xue
            Assignee: Maryann Xue
            Priority: Minor


{code}
CREATE TABLE t (
    mypk VARCHAR(100) NOT NULL PRIMARY KEY,
    mycol VARCHAR(200));

SELECT * FROM t t1 JOIN t t2 ON t1.mypk = t2.mypk;
{code}
would produce a plan like:
{code}
SORT-MERGE-JOIN (INNER) TABLES
    CLIENT PARALLEL 1-WAY FULL SCAN OVER T
AND
    CLIENT PARALLEL 1-WAY FULL SCAN OVER T
        SERVER SORTED BY [MYPK]
    CLIENT MERGE SORT
{code}
, while it should have generated a plan like:
{code}
SORT-MERGE-JOIN (INNER) TABLES
    CLIENT PARALLEL 1-WAY FULL SCAN OVER T
AND
    CLIENT PARALLEL 1-WAY FULL SCAN OVER T
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)