You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Lars Hofhansl (Jira)" <ji...@apache.org> on 2020/07/25 06:05:00 UTC

[jira] [Comment Edited] (PHOENIX-6045) Delete that should qualify for index path does not use index when multiple indexes are available.

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

Lars Hofhansl edited comment on PHOENIX-6045 at 7/25/20, 6:04 AM:
------------------------------------------------------------------

It's not using any index because neither index covers the key the other index.
It needs that since it needs to delete from all other indexes as well, so it needs all index keys.

I can't try right now, but I bet you that if you change the first index to:

{{CREATE INDEX IF NOT EXISTS IE1_TABLE1 ON TABLE1 (VAL1) INCLUDE (VAL2)}}

It will use the first index.

(I verified in another issue that it works fine when the index is LOCAL (missing columns are filled in in that case))

I think this is working as designed.


was (Author: lhofhansl):
It's not using any index because neither index covers the key the other index.
It needs that since it needs to delete from all other indexes as well, so it needs all index keys.

I can't try right now, but I bet you that if you change the first index to:

{{CREATE INDEX IF NOT EXISTS IE1_TABLE1 ON TABLE1 (VAL1) INCLUDE (VAL2)}}

It will use the first index.

(I verified in another issue that it works fine when the index is LOCAL (missing columns are filled in in that case))


> Delete that should qualify for index path does not use index when multiple indexes are available.
> -------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6045
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6045
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0, 4.15.0, 4.14.3
>            Reporter: Daniel Wong
>            Priority: Major
>             Fix For: 5.1.0, 4.16.0
>
>         Attachments: MultipleDeleteReproIT.java
>
>
> Delete that should qualify for index path does not use index when multiple indexes are available.  Test case to reproduce will be below.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)