Hi Nacho, One solution is to include the columns that you like to query over, in your index creation query. This works for me:
0: jdbc:phoenix:localhost> create local index idx2 on test_table (col2) include (col1); 2 rows affected (0.642 seconds) 0: jdbc:phoenix:localhost> explain select * from test_table where col2 = 'v1-2' and col1 = 'v1-1'; +------------------------------------------+ | PLAN | +------------------------------------------+ | CLIENT 1-CHUNK PARALLEL 1-WAY RANGE SCAN OVER _LOCAL_IDX_TEST_TABLE [-32767,'v1-2'] | | SERVER FILTER BY "COL1" = 'v1-1' | +------------------------------------------+ I hope it helps. Best, Afshin On Dec 15, 2015, at 8:48 AM, Jacobo Coll <[email protected]<mailto:[email protected]>> wrote: create table test_table (mykey varchar primary key, col1 varchar, col2 varchar); create local index idx2 on test_table (col2); upsert into test_table (mykey, col1, col2) values('k1', 'v1-1', 'v1-2'); upsert into test_table (mykey, col1, col2) values('k2', 'v2-1', 'v2-2');
