38.5.7 #GETCOUNT (gets the number of data items stored in a chunk)
- Function
-
This subcommand gets the number of data items stored in the specified chunk.
#GETCOUNT can be executed on multi-chunk tables.
- Format
-
#GETCOUNT table-name CHUNKID=chunk-ID;
- table-name
-
Specifies the table name from which to get the number of data items. For table-name, you can specify only a multi-chunk table for which the HADB user (authorization identifier) connected to the HADB server has the SELECT privilege.
- chunk-ID
-
Specifies the chunk ID for which to get the number of data items. Specifies an existing chunk ID. For details about how to find out chunk IDs, see Searching system tables in the HADB Setup and Operation Guide.
- Note
-
You can use this subcommand to acquire the number of data items stored in the chunk of the specified chunk ID even if that chunk is in wait status.
- Important points
-
-
The output format of #GETCOUNT is the same as that of the SELECT statement for searching a table specified for table name. For details about the output format of the SELECT statement, see 38.7.2 Data manipulation SQL statements (SELECT statement).
-
#GETCOUNT results are output even if #SET DISPLAY is set to OFF (do not output search results). For details about #SET DISPLAY of the adbsql subcommand, see 38.5.12 #SET DISPLAY (outputs the retrieval results).
-
If #GETCOUNT is specified, the #SET EXECTIME REPORT and #SET OPT REPORT specifications are not enabled (always treated as OFF).
-