[ 
https://issues.apache.org/jira/browse/PHOENIX-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908449#comment-13908449
 ] 

Maryann Xue commented on PHOENIX-68:
------------------------------------

[~giacomotaylor] I was struggling about the name too. Since we do hash joins 
now, in some cases, we can not avoid star join. For example multiple left join 
like A left join B left join C. The RHS always has to be put on the hash side 
and the leading table always has to be on the scan side. So in this case, we 
can only do one-pass scan on table A, joining table B and C at the same time.
Anyway, the name USE_STAR_JOIN also looks good to me, since in many cases, 
people simply use "JOIN" (= INNER JOIN) and thus there won't be much ambiguity 
there.

> Add Option "FAVOR_STAR_JOIN" to indicate if star join optimization is 
> preferred for multi inner join queries
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-68
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-68
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>            Priority: Minor
>             Fix For: 3.0.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> We enable an option called "FAVOR_STAR_JOIN" to allow for choosing different 
> execution plans for multi inner join queries.
> For example:
> select * from A inner join B on A.ab_id = B.ab_id inner join C on A.ac_id = 
> C.ac_id and B.bc_id = C.bc_id;
> When using star-join optimization, the execution steps will be like:
> hash B, hash C --> join A
> If star-join is turned off, the execution steps will be like:
> hash A --> join B --> hash temp result AB --> join C



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to