Hitachi

Hitachi Advanced Database Command Reference


16.3.2 Rebuilding specified indexes

The example below shows the rebuilding of indexes BIDX02, TIDX01, and RIDX01 under the following conditions:

[Figure]

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

Procedure
  1. Create an index identifier file.

  2. Create an index rebuild option file.

  3. Execute the adbidxrebuild command.

Using examples, the following subsections explain each of these steps.

Organization of this subsection

(1) Creating an index identifier file

This example creates an index identifier file and specifies in that file the identifiers of the indexes that are to be subject to index rebuild processing.

Specification example of index identifier file
BIDX02
TIDX01
RIDX01

(2) Creating an index rebuild option file

This example creates an index rebuild option file and specifies index rebuild options in that file.

Specification example of index rebuild option file
set adb_idxrebuild_rthd_num = 3
set adb_idxrebuild_scan_buff_size = 2
      :

(3) Executing the adbidxrebuild command

adbidxrebuild -u ADBUSER01                                            ...1
              -p '#HelloHADB_01'                                      ...2
              -g 10                                                   ...3
              -z /home/adbmanager/rebuild_file/idxrebuild_opt.txt     ...4
              -i /home/adbmanager/rebuild_file/table01_idx.txt        ...5
              TABLE01                                                 ...6
Explanation:
  1. Specifies the authorization identifier of the HADB user who executes the adbidxrebuild command.

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

  3. Specifies that the index rebuild processing progress message (KFAA80205-I) is to be output after every 10,000 rows.

  4. Specifies the absolute path name of the index rebuild option file created in (2) Creating an index rebuild option file.

  5. Specifies the absolute path name of the index identifier file created in (1) Creating an index identifier file.

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