1

I hit slow query problem with PrefixFilter

After looking at

Should I use prefixfilter or rowkey range scan in HBase

and

https://community.hortonworks.com/articles/55204/recommended-way-to-do-hbase-prefix-scan-through-hb.html

I see that PrefixFilter is doing full table scan, then I would want to ask, since startRowKey and stopRowKey works fast, what's the point for HBase to provide the PrefixFilter API, I think this filter API should not exist at all, or when could I use PrefixFilter?

Tom
  • 5,848
  • 12
  • 44
  • 104
  • using this (Java) code I did not observe any performance issue and I'm quite sure that no full scan is peformed `scan = new Scan(Bytes.toBytes(rowPrefix));` `scan.setRowPrefixFilter(Bytes.toBytes(rowPrefix));` – Harold Sep 05 '18 at 08:38
  • Yes,the code you provides has no performance issue, then what about `scan.setPrefixFilter(new PrefixFilter(Bytes.toBytes(rowPrefix)))`? – Tom Sep 06 '18 at 00:57

0 Answers0