comnetwork edited a comment on pull request #1256: URL: https://github.com/apache/phoenix/pull/1256#issuecomment-871044039
@kadirozde ,thank you for reply. > However, based on my experience, it will perform better in most of the cases in practice. This is because the index PK is designed by the user who knows the use case (the type and shape of queries) and the user wants that the index should be used if the index row key prefix length is greater than the data row key prefix length for a given query in general. If there is just one index, your said may be right, but if there is lots of index, it is hard to make sure what is the user's intention, may be the user just leave out some columns in the global index. > I understand your concern here and please help me out on how to proceed here. I can add a config param to use uncovered indexes without a specific hint. This mean that we will preserve the existing behavior if the config param is not specified. Would that address your concern? In my opinion, your implemention now is better than the existing implemention which rewrite the sql with the columns that are not covered by the global index as `InSubquery` , you could remove the existing implemention and replace with your new implemention which also repsect the Index Hint and at the same time avoid to give user two different chocies to achieve the same purpose. In short , I think if we could not make sure the index performs better, we would better be conservative and let the user to decide rather than making decisions for the user. In any case, you may also let the user know you scaning the gobal index and retrieving the corresponding rows from the data table when they execute explain sql. -- 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]
