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

James Taylor commented on PHOENIX-3941:
---------------------------------------

[~maryannxue] - would you mind taking a look at this v2 patch? I'm trying to 
keep the data plan with the query plan used for an index (so we can potentially 
prune local index regions when there are leading PK columns in common between 
the data table and index table). For joins, I'm losing the 
QueryCompiler.dataPlan along the way and I'm not sure how to fix it.

> Filter regions to scan for local indexes based on data table leading pk 
> filter conditions
> -----------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3941
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3941
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>            Priority: Major
>              Labels: SFDC, localIndex
>             Fix For: 4.14.0
>
>         Attachments: PHOENIX-3941_v1.patch, PHOENIX-3941_v2.patch
>
>
> Had a good offline conversation with [~ndimiduk] at PhoenixCon about local 
> indexes. Depending on the query, we can often times prune the regions we need 
> to scan over based on the where conditions against the data table pk. For 
> example, with a multi-tenant table, we only need to scan the regions that are 
> prefixed by the tenant ID.
> We can easily get this information from the compilation of the query against 
> the data table (which we always do), through the 
> statementContext.getScanRanges() structure. We'd just want to keep a pointer 
> to the data table QueryPlan from the local index QueryPlan.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to