Re: Secondary index question

2018-02-27 Thread Miles Spielberg
I believe this is the same bug we encountered with local indexes where Phoenix 4.13.1 failed to join back to the main table if the local index is not covering for all columns referenced in the WHERE. > On Feb 27, 2018, at 9:36 AM, James Taylor wrote: > > Please file a

Re: Secondary index question

2018-02-27 Thread James Taylor
Please file a JIRA and include the Phoenix and HBase version. Sounds like you’ve found a bug. On Tue, Feb 27, 2018 at 9:21 AM Jonathan Leech wrote: > I’ve done what you’re looking for by selecting the pk from the index in a > nested query and filtering the other column

Re: Secondary index question

2018-02-27 Thread Jonathan Leech
I’ve done what you’re looking for by selecting the pk from the index in a nested query and filtering the other column separately. > On Feb 27, 2018, at 6:39 AM, Alexey Karpov wrote: > > Thanks for quick answer, but my case is a slightly different. I've seen these > links

Re: Secondary index question

2018-02-27 Thread Alexey Karpov
Thanks for quick answer, but my case is a slightly different. I've seen these links and already use local index. All cases, described in faq, index_usage and any other, I've found in this user list, are about SELECT clause. In WHERE clause there is always field from the index. In my case in WHERE

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 *

Re: Phoenix Secondary index question

2017-01-04 Thread Jeremy Huffman
Udit once they have been persisted Phoenix tables and indexes are just normal rows in HBase tables. HBase backups and replication would work just fine. It may be helpful to make a small table with index, upsert a few rows and look at the raw entries with the HBase shell to understand what Phoenix

Re: Phoenix Secondary index question

2017-01-03 Thread James Taylor
Hi Udit, You'll need to use Phoenix APIs when you update your data if you want Phoenix to keep you index in sync with your table. Thanks, James On Tue, Jan 3, 2017 at 1:32 PM, Udit Mehta wrote: > Hi All, > > I am facing an issue while working with secondary indexes on a

Phoenix Secondary index question

2017-01-03 Thread Udit Mehta
Hi All, I am facing an issue while working with secondary indexes on a Phoenix view/table that is created on top of an existing Hbase table. I basically have an existing Hbase table with a few rows and I then build a Phoenix view on this table. This works fine and any updates directly to the