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

Thomas D'Silva commented on PHOENIX-4882:
-----------------------------------------

We can probably be smarter about resolving the  data table for columns that 
aren't present in the local Index. I also see the data table being resolved 
from IndexExpressionParseNodeRewriter. We also have this TODO in BaseQueryPlan

{code}
 // TODO: is it necessary to re-resolve the table?
                TableRef dataTableRef =
                        FromCompiler.getResolver(
                            FACTORY.namedTable(null, 
TableName.create(parentSchemaName, parentTableName)),
                            
context.getConnection()).resolveTable(parentSchemaName, parentTableName);
                PTable dataTable = dataTableRef.getTable();
{code}

> The client re-resolves the table for every projected non-indexed column when 
> there's a local index.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4882
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4882
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Lars Hofhansl
>            Priority: Major
>
> See TupleProjectionCompiler.ColumnRefVisitor.
> Each non-projected column causes a server roundtrip in 
> LocalIndexDataColumnRef.
> For wide tables that can be hundreds of time.
> I generally find that the same table is resolved over and over again for 
> other reasons as well (I counted 15-25 times during query compilation!!)
> Put a break point in ConnectionQueryServicesImpl.getTable and you'll see.
> [~tdsilva]



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

Reply via email to