关于hbase scan查询的效率----filterlist(急)
scan.setFilters()
通过filter设置的条件查不到数据时,响应速度非常慢,大概在十几秒,有时会超时,
但可以查到数据时,响应速度只有几百ms,差距非常大
环境:
数据10W条,表为单一列族,30-40的列
部分代码:
Scan scan = new Scan();
FilterList filters = new FilterList();
for (String[] param : params)
{
//param[0]为列名,param[1]为相应的值
filters.addFilter(new SingleColumnValueFilter("INFO".getBytes(), param[0].getBytes(), CompareOp.EQUAL, param[1].getBytes()));
}
scan.setFilter(filters);
scan.setCaching(count + 1);
ResultScanner resultScanner = null;
resultScanner = table.getScanner(scan);
//通过debug,查不到数据的情况下在resultScanner.next()就已经停住不动了
while ((result = resultScanner.next()) != null)
{
....
}
有人清楚是什么原因造成的么? 非常感谢