sanjeet006py commented on code in PR #1851:
URL: https://github.com/apache/phoenix/pull/1851#discussion_r1517610019
##########
phoenix-core-client/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -247,6 +248,10 @@ private List<QueryPlan>
getApplicablePlansForSingleFlatQuery(QueryPlan dataPlan,
}
plans.add(0, hintedPlan);
}
+ if (dataPlan.getContext().getScanRanges().isPointLookup()
+ && stopAtBestPlan && dataPlan.isApplicable()) {
+ return Collections.<QueryPlan> singletonList(dataPlan);
+ }
Review Comment:
@tkhurana I see that if we remove this block then code goes on to create
query plan for each index of the original data table. And, to create query plan
for each index at least 1 RPC call is done per index so, I think this can be
expensive when the end result we know is original data plan but we will still
do RPC calls for other indexes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]