hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jtay...@salesforce.com>
Subject Re: 答复: Fastest way to get count of records in huge hbase table?
Date Wed, 11 Sep 2013 04:17:16 GMT
Use Phoenix (https://github.com/forcedotcom/phoenix) by doing the following:
CREATE VIEW "myHTableName" (key VARBINARY NOT NULL PRIMARY KEY);
SELECT COUNT(*) FROM "myHTableName";

As fenghonghua@xiaomi.com said, you still need to scan the table, but
Phoenix will do it in parallel and use a coprocessor and an internal
scanner API to speed things up.

Thanks,
James
@JamesPlusPlus


On Tue, Sep 10, 2013 at 7:01 PM, 冯宏华 <fenghonghua@xiaomi.com> wrote:

> No fast way to get the count of records of a table without scanning and
> counting, especially when you want to get the accurate count. By design the
> data/cells of a same record/row can scatter in many different HFiles and
> memstore, so even we can record the count of records of each HFile as meta
> in FileInfo, we still need to de-dup to get the accurate total count, which
> only can be achieved by scanning.
> ________________________________________
> 发件人: Ramasubramanian Narayanan [ramasubramanian.narayanan@gmail.com]
> 发送时间: 2013年9月10日 16:07
> 收件人: user@hbase.apache.org
> 主题: Fastest way to get count of records in huge hbase table?
>
> Dear All,
>
> Is there any fastest way to get the count of records in a huge HBASE table
> with billions of records?
>
> The normal count command is running for a hour with this huge volume of
> data..
>
> regards,
> Rams
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message