Help Center/ GeminiDB/ GeminiDB Cassandra API/ GeminiDB HBase Instance/ Instructions for Use/ How Can I Count the Number of Rows in a Table?
Updated on 2025-05-07 GMT+08:00

How Can I Count the Number of Rows in a Table?

This section describes how to count the total number of rows in a table of a GeminiDB HBase instance.

You can run COUNT on the HBase client to count the number of rows in a table of a GeminiDB HBase instance. For details, see Connecting to an Instance over a Private Network.

COUNT scans all data in a table in batches. You are advised to run COUNT on an ECS in the same VPC as the GeminiDB HBase instance. The scan speed varies depending on the table structure. Run the following statement to count the total number of rows in the table:

count 'table_name'