Re: Secondary index question

2018-02-26 Thread Josh Elser
Thanks for the pointer, James. I looked quickly but didn't find it :) Let us know if that explains it, Alexey. On 2/26/18 1:41 PM, James Taylor wrote: See https://phoenix.apache.org/secondary_indexing.html#Index_Usage. We get this question a fair amount. We have an FAQ, here [1], but it's not

Re: Secondary index question

2018-02-26 Thread James Taylor
See https://phoenix.apache.org/secondary_indexing.html#Index_Usage. We get this question a fair amount. We have an FAQ, here [1], but it's not a very complete answer (as it doesn't mention hinting or local indexes), so it'd be good if it was updated. Thanks, James [1]

Re: Secondary index question

2018-02-26 Thread Josh Elser
IIRC, Phoenix will only choose to use an index when all columns are covered (either the index is on the columns or the columns are explicitly configured to be covered in the DDL). On 2/26/18 6:45 AM, Alexey Karpov wrote: Hi. Let’s say I have a table CREATE TABLE test (id integer NOT NULL

Secondary index question

2018-02-26 Thread Alexey Karpov
Hi. Let’s say I have a table CREATE TABLE test (id integer NOT NULL PRIMARY KEY, name VARCHAR, description VARCHAR) with local index CREATE LOCAL INDEX ix_test_name ON test(name) For the query SELECT * FROM test WHERE name = 'a' it’s all right, Phoenix uses index. But for the query SELECT *