Hitachi

Hitachi Advanced Database Command Reference


33.3.1 Merging all chunks in a table

This example merges under the following conditions all chunks in table TABLE01 into a new chunk:

  1. CHUNK is specified when table TABLE01 is defined (table TABLE01 is a multi-chunk table).

  2. B-tree, text, and range indexes are defined for table TABLE01.

  3. Data was imported into table TABLE01 by applying the background-import facility twice.

  4. Table TABLE01 has chunks with chunk IDs 1, 2, and 3.

  5. The chunk ID of table TABLE01's current chunk is 3.

[Figure]

This example uses the following procedure to execute the adbmergechunk command.

Procedure
  1. Create a merge chunk option file.

  2. Execute the adbmergechunk command.

Using an example, the following subsections explain each of these steps.

Organization of this subsection

(1) Creating a merge chunk option file

This example creates a merge chunk option file and specifies merge chunk options in that file.

Example of a merge chunk option file
set adb_mergechunk_rthd_num = 3
set adb_mergechunk_scan_buff_size = 2
      :

(2) Executing the adbmergechunk command

adbmergechunk -u ADBUSER01                                       ...1
              -p '#HelloHADB_01'                                 ...2
              -z /home/adbmanager/merge_file/mergechunk_opt.txt  ...3
              -m 'January 2014'                                  ...4
              -c ALL                                             ...5
              TABLE01                                            ...6
Explanation:
  1. Specifies the authorization identifier of the HADB user who executes the adbmergechunk command.

  2. Specifies the password for the authorization identifier that is specified in the -u option.

  3. Specifies the absolute path name of the merge chunk option file created in (1) Creating a merge chunk option file.

  4. Specifies a comment to be set in the merge-target chunk.

  5. Specifies ALL in the -c option to merge all chunks in the target table (TABLE01).

    This example merges chunks with chunk IDs 1, 2, and 3. After the adbmergechunk command has executed, the merge-target chunk becomes the current chunk.

  6. Specifies the table to be processed (TABLE01).