Spec-Zone .ru
спецификации, руководства, описания, API

17.4.20. ndb_select_count — Print Row Counts for NDB Tables

ndb_select_count prints the number of rows in one or more NDB tables. With a single table, the result is equivalent to that obtained by using the MySQL statement SELECT COUNT(*) FROM tbl_name.

Usage

ndb_select_count [-c connect_string] -ddb_name tbl_name[, tbl_name2[, ...]]

The following table includes options that are specific to the MySQL Cluster native backup restoration program ndb_select_count. Additional descriptions follow the table. For options common to most MySQL Cluster programs (including ndb_select_count), see Section 17.4.25, "Options Common to MySQL Cluster Programs — Options Common to MySQL Cluster Programs".

Table 17.24. ndb_select_count Options and Variables: MySQL ClusterNDB 7.3

Format Description Added / Removed

--database=dbname,

-d

Name of the database in which the table is found

All MySQL 5.6 based releases

--parallelism=#,

-p

Degree of parallelism

All MySQL 5.6 based releases

--lock=#,

-l

Lock type

All MySQL 5.6 based releases


You can obtain row counts from multiple tables in the same database by listing the table names separated by spaces when invoking this command, as shown under Sample Output.

Sample Output

shell> ./ndb_select_count -c localhost -d ctest1 fish
        dogs6 records in table fish4 records in table dogsNDBT_ProgramExit: 0 - OK