[
https://issues.apache.org/jira/browse/PHOENIX-4632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16384084#comment-16384084
]
James Taylor commented on PHOENIX-4632:
---------------------------------------
[~rajeshbabu] - would you have any spare cycles to take a look?
> Phoenix does not use local index if there is a field in where clause not
> included in index
> ------------------------------------------------------------------------------------------
>
> Key: PHOENIX-4632
> URL: https://issues.apache.org/jira/browse/PHOENIX-4632
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.7.0
> Reporter: Alexey Karpov
> Priority: Major
>
> HDP 2.6.2, Phoenix 4.7.0, HBase 1.1.2.2.6.2.0-205
> If in WHERE clause you have one field from the local index and one not from
> the index, combined with AND operator, Phoenix decides to do a full scan.
> Steps to reproduce:
> CREATE TABLE test (id integer NOT NULL PRIMARY KEY,
> name VARCHAR, description VARCHAR)
> CREATE LOCAL INDEX ix_test_name ON test(name)
> explain SELECT * FROM test WHERE name = 'a' AND description = 'b'
> CLIENT 1-CHUNK PARALLEL 1-WAY ROUND ROBIN FULL SCAN OVER TEST
> SERVER FILTER BY (NAME = 'a' AND DESCRIPTION = 'b')
> After removing not indexed field in starts working as expected:
> explain SELECT * FROM test WHERE name = 'a'
> CLIENT 1-CHUNK PARALLEL 1-WAY ROUND ROBIN RANGE SCAN OVER TEST [1,'a']
> SERVER FILTER BY FIRST KEY ONLY
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)