You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "wangweiyi (JIRA)" <ji...@apache.org> on 2016/09/22 02:58:20 UTC

[jira] [Updated] (PHOENIX-3310) where clause optimization in join queries work not well

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

wangweiyi updated PHOENIX-3310:
-------------------------------
    Description: 
select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1'
select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1'

the column "col1" is the primary key for table "xxx" and table "yyy"

the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take where clause into account, this can be optimized.

  was:
select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1'
select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1'

the column "col1" is the primary key for table "xxx" and table "yyy"

the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take the where clause into account, this can be optimized.


> where clause optimization in join queries work not well
> -------------------------------------------------------
>
>                 Key: PHOENIX-3310
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3310
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.8.0
>            Reporter: wangweiyi
>
> select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1'
> select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1'
> the column "col1" is the primary key for table "xxx" and table "yyy"
> the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take where clause into account, this can be optimized.



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