Re: Query optimization

2019-06-19 Thread Alexander Batyrshin
Is it possible not to full scan table1 for ’table1.col = ?’, but do this check only on subset table1.pk IN (…)? > On 19 Jun 2019, at 23:31, Vincent Poon wrote: > > 'table1.col = ?' will be a full table scan of table1 unless you have a > secondary index on table.col > Check the explain plan to

java.io.IOException: Added a key not lexically larger than previous

2019-06-19 Thread Alexander Batyrshin
Hello, Are there any ideas where this problem comes from and how to fix? Jun 18 21:38:05 prod022 hbase[148581]: 2019-06-18 21:38:05,348 WARN [MemStoreFlusher.0] regionserver.HStore: Failed flushing store file, retrying num=9 Jun 18 21:38:05 prod022 hbase[148581]: java.io.IOException: Added a

Re: Query optimization

2019-06-19 Thread Vincent Poon
'table1.col = ?' will be a full table scan of table1 unless you have a secondary index on table.col Check the explain plan to see if it's working as expected On Wed, Jun 19, 2019 at 7:43 AM Alexander Batyrshin <0x62...@gmail.com> wrote: > Hello, > We have 2 tables: > > Table1 - big one (2000M+

Re: A strange question about Phoenix

2019-06-19 Thread jesse
1) hbase clone-snapshot into my_table 2) sqlline.py zk:port console to create my_table. Very straight forward. On Wed, Jun 19, 2019, 11:40 AM anil gupta wrote: > Sounds strange. > What steps you followed to restore snapshot of Phoenix table? > > On Tue, Jun 18, 2019 at 9:34 PM jesse wrote:

Re: A strange question about Phoenix

2019-06-19 Thread anil gupta
Sounds strange. What steps you followed to restore snapshot of Phoenix table? On Tue, Jun 18, 2019 at 9:34 PM jesse wrote: > hi: > > When my table is restored via hbase clone-snapshot, > > 1) sqlline.py console shows the proper number of records: select count(*) > from my_table. > 2) select

Query optimization

2019-06-19 Thread Alexander Batyrshin
Hello, We have 2 tables: Table1 - big one (2000M+ rows): CREATE TABLE table1 ( pk varchar PRIMARY KEY, col varchar ); Table2 - small one (300K rows): CREATE TABLE table2 ( pk varchar PRIMARY KEY, other varchar ); Query like this work fast (~ 30sec): SELECT table1.pk,