phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumar Palaniappan <kpalaniap...@marinsoftware.com>
Subject Re: array of BIGINT index
Date Tue, 05 Jan 2016 23:46:08 GMT
Thanks James for the response. Our use case is, that array holds all the
accounts for a particular customer. so the  table and query is

CREATE TABLE T ( ID VARCHAR PRIMARY KEY, A BIGINT ARRAY);

find by account is a use case -

select  ID from table T where ANY (A);

On Tue, Jan 5, 2016 at 3:34 PM, James Taylor <jamestaylor@apache.org> wrote:

> There is some limited indexing you can do on an array by creating a
> functional index for a particular array element. For example:
>     CREATE TABLE T (K VARCHAR PRIMARY KEY, A BIGINT ARRAY);
>     CREATE INDEX IDX ON T (A[3]);
>
> In this case, the following query would use the index:
>     SELECT K FROM T WHERE A[3] = 5;
>
> Does this help for your usage?
>
> Thanks,
> James
>
> On Tue, Jan 5, 2016 at 2:51 PM, Kumar Palaniappan <
> kpalaniappan@marinsoftware.com> wrote:
>
>>
>>
>> We have a table with a data type BIGINT[], Since phoenix doesnt support
>> to index this data type, our queries are doing a full table scan when we
>> have to do filtering on this field.
>>
>> What are the alternate approaches? Tried looking into Views, but nope.
>>
>> Appreciate your time.
>>
>> Kumar
>>
>
>

Mime
View raw message