Hitachi

Hitachi Advanced Database Command Reference


16.3.1 Rebuilding indexes in unfinished status

The example below shows the rebuilding of indexes BIDX02, TIDX01, and RIDX01, which are in unfinished status, so that they can be used. The following conditions apply:

  1. B-tree index BIDX01 is defined for table TABLE01.

  2. Data is stored in table TABLE01.

  3. After data was stored in table TABLE01, definitions for B-tree index BIDX02, text index TIDX01, and range index RIDX01 were added to table TABLE01 (BIDX02, TIDX01, and RIDX01 are in unfinished status).

[Figure]

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

Procedure
  1. Create an index rebuild option file.

  2. Execute the adbidxrebuild command.

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

Organization of this subsection

(1) 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
      :

(2) Executing the adbidxrebuild command

adbidxrebuild -u ADBUSER01                                            ...1
              -p '#HelloHADB_01'                                      ...2
              -g 10                                                   ...3
              -z /home/adbmanager/rebuild_file/idxrebuild_opt.txt     ...4
              TABLE01                                                 ...5
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 (1) Creating an index rebuild option file.

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

    Because no index identifier file is specified, the indexes in unfinished status (BIDX02, TIDX01, and RIDX01) that have been defined for the target table are rebuilt.