Re: Is there any way to using appropriate index automatically?

2019-08-20 Thread you Zhuang
Er, I also read the sentence “Unlike global indexes, local indexes will use an index even when all columns referenced in the query are not contained in the index. This is done by default for local indexes because we know that the table and index data co-reside on the same region server thus ensu

Re: Is there any way to using appropriate index automatically?

2019-08-20 Thread Ankit Singhal
CREATE local INDEX local_c_h_index ON test_phoenix.app (c,h) ASYNC; (Has been filled data with bulkload and index is active) Query: select /*+ INDEX(test_phoenix.app local_c_h_index) */ * from TEST_PHOENIX.APP where c=2 and h = 1 limit 5; select * from TEST_PHOENIX.APP where c=2 and h = 1 limit 5;

Re: Buckets VS regions

2019-08-20 Thread Ankit Singhal
What is the Phoenix version(if you are not on the latest version probably stats inconsistency is already fixed by now), if you are working on test setup and can reproduce it again, create JIRA and please upload the debug log of the query, hbase:meta and system.stats on it (remember these may have s

Re: Is there any way to using appropriate index automatically?

2019-08-20 Thread Vincent Poon
check out PHOENIX-5109 , it likely fixes your issue. Unfortunately it's targeted for 4.15.0 which hasn't been released yet. Maybe you can backport and see if it works for your query. On Tue, Aug 20, 2019 at 11:38 AM Ankit Singhal wrote: > CREATE local INDEX local_c_h_index ON test_phoenix.app (c