Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.4.8 Checking the chunk status and the number of chunks created

This subsection describes how to check the status of chunks created in a multi-chunk table and the number of chunks created.

You can check information of chunks (the chunk status and the number of chunks) in the following ways:

The following subsections describe the methods of checking chunk information.

Organization of this subsection

(1) Executing the adbdbstatus command

You can use the adbdbstatus command to check the following chunk information:

Chunk information that can be checked in the DB area summary information

Execute the adbdbstatus command with the -c dbarea option specified. In the execution result of the command, you can check the following information regarding a multi-chunk table:

  • Creatable_chunks (Number of chunks that can be created in a DB area)

  • Created_chunks (Number of chunks that have been created in a DB area)

Chunk information that can be checked in the table summary information

Execute the adbdbstatus command with the -c table option specified. In the execution result of the command, you can check the following information regarding a multi-chunk table:

  • Creatable_chunks (Number of chunks that can be created in a base table)

  • Created_chunks (Number of chunks that have been created in a base table)

  • Current_chunk_ID (Current chunk ID of a base table)

  • Storage_format (Table-data storage format)

For an archivable multi-chunk table, you can also check the following information from the execution result of the command:

  • Archive_chunks (Number of archived chunks)

Chunk information that can be checked in the archived chunk summary information

Execute the adbdbstatus command with the -c archivechunk option specified. In the execution result of the command, you can check the following information regarding an archivable multi-chunk table:

  • Chunk_ID (Chunk ID)

  • Chunk_status (Chunk status)

  • Archive_status (Whether the chunk is archived)

  • Range_min (Minimum value for the archive range column)

  • Range_max (Maximum value for the archive range column)

  • Rows (Number of rows stored in an archived chunk)

  • Archive_file_num (Total number of archive files corresponding to an archived chunk)

  • Archive_file_size (Total size of all archive files corresponding to an archived chunk)

  • Unarchive_table_size (Size of segments that were used to store a table in the chunk before being archived)

  • Unarchive_index_size (Size of segments that were used to store an index in the chunk before being archived)

  • Compression_ratio (Compression ratio of an archived chunk)

  • Chunk_comment (Comment set for a chunk)

Chunk information that can be checked in the information about the usage of DB areas, tables, and indexes

Execute the adbdbstatus command with the -d used option specified. In the execution result of the command, you can check the following information regarding a multi-chunk table:

  • Chunk_ID (Chunk ID)

  • Chunk_create_time (Creation date and time of a chunk)

  • Chunk_swap_time (Date and time the current chunk was switched)

  • Chunk_status (Chunk status)

If you use Chunk_ID as a key, you can also check the following information:

  • Used_segments (Number of segments being used for each chunk)

  • Used_pages (Number of pages being used for each chunk)

  • Storage_format (Chunk-data storage format)

Chunk information that can be checked in the archived chunk usage information

Execute the adbdbstatus command with the -d used and -c archivechunk options specified. In the execution result of the command, you can check the following information regarding an archivable multi-chunk table:

  • Chunk_status (Chunk status)

  • Range_min (Minimum value for the archive range column)

  • Range_max (Maximum value for the archive range column)

  • Archive_file_name (Name of an archive file)

  • Archive_file_size (Size of an archive file)

For details about the adbdbstatus command, see adbdbstatus (Analyze the Database Status) in the manual HADB Command Reference.

(2) Searching the SQL_TABLES dictionary table

When you use the SELECT statement to search the SQL_TABLES table, you can check the following chunk information:

For an archivable multi-chunk table, you can also check the following information:

For details about the SQL_TABLES table, see B.2 Content of SQL_TABLES.

For details about how to retrieve data from the SQL_TABLES table, see B.22 Searching a dictionary table.

(3) Searching the STATUS_CHUNKS system table

When you use the SELECT statement to search the STATUS_CHUNKS table, you can check the following chunk information:

For an archivable multi-chunk table, you can also check the following information:

For details about the STATUS_CHUNKS table, see C.5 Content of STATUS_CHUNKS.

For details about how to retrieve data from the STATUS_CHUNKS table, see C.9 Searching system tables.

(4) Searching the SQL_COLUMNS dictionary table

For an archivable multi-chunk table, if you use the SELECT statement to search the SQL_COLUMNS table, you can check the following chunk information:

For details about the SQL_COLUMNS table, see B.3 Content of SQL_COLUMNS.

For details about how to retrieve data from the SQL_COLUMNS table, see B.22 Searching a dictionary table.

(5) Searching the SQL_INDEXES dictionary table

For an archivable multi-chunk table, if you use the SELECT statement to search the SQL_INDEXES table, you can check the following chunk information:

For details about the SQL_INDEXES table, see B.5 Content of SQL_INDEXES.

For details about how to retrieve data from the SQL_INDEXES table, see B.22 Searching a dictionary table.