phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 金砖 <jinzh...@wacai.com>
Subject does secondary index works on view on hbase ?
Date Thu, 21 Apr 2016 12:16:40 GMT
1. I have hbase table:
     hbase shell: create 'table', 'cf'

2. then create view on that
    phoenix: create view "table" (pk varchar primary key, "cf"."field" 
varchar);

3. create index on view
     phoenix:  create index idx on "table" ("cf"."field");

  IDX created in phoenix, and I can select from IDX:
     select "*" from IDX where "cf:field" = 'xxxx';

It's pretty fast, and it works.

But when using this:
     select * from "table" where "cf"."field" = 'xxx';
or this:
     select /*+ INDEX("table" IDX) */ * from "table" where "cf"."field" 
= 'xxx';

The index doesn't work, can anyone help out ?

Mime
View raw message