[
https://issues.apache.org/jira/browse/PHOENIX-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092907#comment-14092907
]
Maryann Xue commented on PHOENIX-852:
-------------------------------------
Yes. Let me make it clearer:
LHS=(a, 1),(c, 2); Schema: (col0, col1) pk (col0).
RHS=(a, 3),(a, 5),(c, 4); Schema: (col0, col1) pk (col0, col1).
With "select LHS.col0, LHS.col1 from LHS inner join RHS on LHS.col0 =
RHS.col0", we should get (a,1),(a,1),(c,2)
With "select col0, col1 from LHS where col0 in (select col0 from RHS)", we will
get (a,1),(c,2)
> Optimize child/parent foreign key joins
> ---------------------------------------
>
> Key: PHOENIX-852
> URL: https://issues.apache.org/jira/browse/PHOENIX-852
> Project: Phoenix
> Issue Type: Improvement
> Reporter: James Taylor
> Assignee: Maryann Xue
>
> Often times a join will occur from a child to a parent. Our current algorithm
> would do a full scan of one side or the other. We can do much better than
> that if the HashCache contains the PK (or even part of the PK) from the table
> being joined to. In these cases, we should drive the second scan through a
> skip scan on the server side.
--
This message was sent by Atlassian JIRA
(v6.2#6252)