You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/06/29 08:32:47 UTC

[GitHub] [phoenix] comnetwork edited a comment on pull request #1256: PHOENIX-6458 Using global indexes for queries with uncovered columns

comnetwork edited a comment on pull request #1256:
URL: https://github.com/apache/phoenix/pull/1256#issuecomment-870392940


   @kadirozde @lhofhansl  FYI.
   
   1.You said "Phoenix client does not use a global index for the queries with the columns that are not covered by the global index" is not right , In QueryOptimizer.addPlan, if user specify a Index  Hint and there exists where clause, the sql would be rewritten as
   "SELECT /*+ NO_INDEX */ K,V1,V2 FROM T  WHERE ("K" IN ((SELECT /*+ INDEX(T IDX) */ ":K" FROM "IDX"  WHERE "0:V1" = 'bar')) AND V2 = 'foo') " , you may consider compatibility with exising code.
   
   2.Whether or not scaning the gobal index and  retrieving the corresponding rows from the data table is better than just scaning the data table is a complex problem, because there are many factors we need to  consider such as Network cost, random disk access cost , data distribution , column selective  etc.  you said "It is expected that such performance improvement will happen when the index row key prefix length is greater than the data row key prefix length for a given query" is extremely insufficient.  Lack of a CBO framework in Phoenix, it is sensible to be conservative, I think it is better to left the choice to user by users specifying the Index Hint just as the existing code.
   
   
   


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org