21.4.26 ndb_select_count —打印 NDBtable 的行数
ndb_select_count打印一个或多个NDBtable 中的行数。对于单个 table,结果等同于使用 MySQL 语句SELECT COUNT(*) FROM tbl_name
获得的结果。
Usage
ndb_select_count [-c connection_string] -ddb_name tbl_name[, tbl_name2[, ...]]
下 table 包含特定于 NDB Cluster 本机备份还原程序ndb_select_count的选项。附加说明如下 table 所示。有关大多数 NDB 群集程序(包括ndb_select_count)共有的选项,请参见第 21.4.32 节“ NDB 群集程序的公用选项-NDB 群集程序的公用选项”。
table21.259 ndb_select_count 程序的命令行选项
Format | Description | 添加,不建议使用或删除 |
---|---|---|
--database=dbname , | ||
-d | 在其中找到 table 的数据库名称 | (在所有基于 MySQL 5.7 的版本中受支持) |
--parallelism=# ,-p | 并行度 | (在所有基于 MySQL 5.7 的版本中受支持) |
--lock=# ,-l | 锁定类型 | (所有基于 MySQL 5.7 的版本均支持) |
您可以通过在调用此命令时列出用空格分隔的 table 名来从同一数据库的多个 table 中获取行数,如 Sample Output 所示。
Sample Output
shell> ./ndb_select_count -c localhost -d ctest1 fish dogs
6 records in table fish
4 records in table dogs
NDBT_ProgramExit: 0 - OK