38.5.1 #CHUNKS (displays chunk information)
- Function
-
This subcommand displays chunk information for the specified table.
- Format
-
#CHUNKS [schema-name.]table-identifier [SHOW {ALL|COMMENT}];
- [schema-name.]table-identifier
-
Specifies the name of a table for which chunk information is to be displayed, in the format schema-name.table-identifier. If the schema name is omitted, the authorization identifier of the HADB user who executed this subcommand is assumed.
For details about the specification rules that apply when a schema name or table identifier includes any lowercase letter or backslash (\), see 1.4.3 Table name specification rules.
- [SHOW {ALL|COMMENT}]
-
If SHOW ALL is specified
All columns in the STATUS_CHUNKS system table are displayed. For details about the displayed information, see Content of STATUS_CHUNKS in the HADB Setup and Operation Guide.
If SHOW COMMENT is specified
Information for all items shown in the following table is displayed.
If this option is omitted (neither SHOW ALL nor SHOW COMMENT is specified)
Information shown in the following table is displayed. However, the CHUNK_COMMENT column is not displayed.
Table 38‒3: Information displayed by #CHUNKS (if SHOW COMMENT is specified or this option is omitted) No.
Column name
Description
1
CHUNK_ID
Chunk ID
2
IS_CURRENT_CHUNK
Current chunk
-
Y: Current chunk
-
N: Not the current chunk
3
CHUNK_STATUS
- Chunk status
-
For details, see CHUNK_STATUS in Content of STATUS_CHUNKS in the HADB Setup and Operation Guide.
4
IS_ARCHIVE
Whether the chunk is an archived chunk
-
Y: Is archived chunk
-
N: Is not archived chunk
5
STORAGE_FORMAT
Chunk-data storage format
-
'COLUMN'
Column store format
-
'ROW'
Row store format
6
CREATE_TIME
- Date and time the chunk was created
-
For details, see CREATE_TIME in Content of STATUS_CHUNKS in the HADB Setup and Operation Guide.
7
CHUNK_COMMENT
- Comment specified in a chunk
-
The null value is stored if no comment is set.
This is displayed only when the SHOW COMMENT option is specified.
-
- Important points
-
-
The scope of chunk information in tables displayed by executing #CHUNKS varies depending on the privileges HADB users have. The following describes the scope of chunk information in tables to be displayed.
- When the authorization identifier of an HADB user with the DBA privilege is used to connect to the HADB server
-
Chunks in tables defined by all HADB users
- When the authorization identifier of an HADB user without the preceding privilege is used to connect to the HADB server
-
-
Chunks in the tables defined by this HADB user (with the authorization identifier that was used for the current connection to the HADB server)
-
Chunks in tables for which access privileges have been granted by other HADB users
-
Chunks in tables permitted in the PUBLIC specification
-
The scope of chunk information in tables displayed by executing #CHUNKS is the same as the scope of information in the STATUS_CHUNKS system table that can be referenced. For details, see Scope of information in system tables that can be referenced by HADB users in System table overview in the HADB Setup and Operation Guide.
-
When #CHUNKS is executed, the system table is locked. Execute the COMMIT statement immediately after you execute #CHUNKS. If you do not execute the COMMIT statement, the lock on the system table will not be released. Note that when you terminate the adbsql command after executing #CHUNKS, the lock on the system table is released, so you do not need to execute the COMMIT statement.
-
If the specified schema name or table identifier does not exist, the execution result of #CHUNKS contains zero rows (no error is generated).
-
The execution results of #CHUNKS are output even if OFF (do not output search results) is specified in #SET DISPLAY. For details about #SET DISPLAY of the adbsql subcommand, see 38.5.12 #SET DISPLAY (outputs the retrieval results).
-
The #CHUNKS execution time is not output even if ON (output SQL statement execution time) is specified in #SET EXECTIME REPORT. For details about #SET EXECTIME REPORT of the adbsql subcommand, see 38.5.14 #SET EXECTIME REPORT (outputs SQL statement execution time).
-
Even if ON (display index, work table, and access path information) is specified in #SET OPT REPORT, index information, work table information, and access path information are not output when #CHUNKS is executed. For details about #SET OPT REPORT of the adbsql subcommand, see 38.5.16 #SET OPT REPORT (displays index, work table, and access path information).
-
The execution results of #CHUNKS are output even if EXEC=PREPARE (do not execute the SQL statement) is specified in #SET OPT REPORT.
-