[
https://issues.apache.org/jira/browse/PHOENIX-6458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371778#comment-17371778
]
ASF GitHub Bot commented on PHOENIX-6458:
-----------------------------------------
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]
> Using global indexes for queries with uncovered columns
> -------------------------------------------------------
>
> Key: PHOENIX-6458
> URL: https://issues.apache.org/jira/browse/PHOENIX-6458
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.1.0
> Reporter: Kadir Ozdemir
> Priority: Major
> Attachments: PHOENIX-6458.master.001.patch
>
>
> Phoenix client does not use a global index for the queries with the columns
> that are not covered by the global index. However, there are many cases where
> using the global index to map secondary keys to primary keys and then
> retrieving the corresponding rows from the data table results in faster
> queries. 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)