16.5.3 If the target table is a single-chunk table
If you are rebuilding a B-tree index defined for a single-chunk table (including a B-tree index corresponding to the primary key) or a text index, you might be able to use the re-execute facility of the adbidxrebuild command. This facility resumes index rebuild processing from the point of B-tree and text index creation processing.
- Organization of this subsection
(1) Notes before re-execution
The re-execute facility is applied automatically when the adbidxrebuild command is re-executed by the same HADB user who executed the adbidxrebuild command that terminated abnormally. No special operation is needed.
If you want to change command options or index rebuild options when you re-execute the adbidxrebuild command, see 16.5.5 Changing command options and index rebuild options during re-execution.
- Important
-
-
If an access error occurred on a command status file (file under the $DBDIR/ADBSYS/ADBUTL directory) and the KFAA50244-E message is issued, re-execute the adbidxrebuild command with the --force option specified. (In this case, index rebuild processing is executed from the beginning.)
For details about how to execute the adbidxrebuild command with the --force option specified, see (2) Executing the adbidxrebuild command with the --force option specified in 16.5.6 If an error occurs during re-execution of the adbidxrebuild command.
-
If an access error occurred on a temporary work file (the KFAA50247-E message is issued), re-execute the adbidxrebuild command with the --create-temp-file option specified. (In this case, index rebuild processing is executed from the point of table data retrieval.)
For details about how to execute the adbidxrebuild command with the --create-temp-file option specified, see (1) Executing the adbidxrebuild command with the --create-temp-file option specified in 16.5.6 If an error occurs during re-execution of the adbidxrebuild command.
-
(2) Whether the re-execute facility is applied (for a single-chunk table)
The table below describes whether the re-execute facility is applied depending on when the adbidxrebuild command was canceled.
Note that the database recovery method is the same regardless of when cancellation occurred.
When canceled#1 |
||
---|---|---|
During table data retrieval processing |
During sort processing |
While creating B-tree and text indexes#2 |
|
|
- #1
-
You can determine when the command was canceled by the messages that are issued, as shown in the following:
- #2
-
If the KFAA80204-I message has been issued with return code 0 or 4, index rebuild processing has been completed. In such a case, there is no need to re-execute the adbidxrebuild command.
If the KFAA80204-I message has not been issued, execute the command shown below and check line 2 in the output results (table summary information) (line 1 in the output results contains the column titles).
adbdbstatus -c table -n name-of-table-for-which-adbidxrebuild-command-was-canceled
Specify name-of-table-for-which-adbidxrebuild-command-was-canceled in the format schema-name.table-identifier.
- ■ When the value of the Command_status column (column 17) is abort and the value of the Rerun_command column (column 18) is adbidxrebuild
-
Index rebuild processing was not completed. Re-execute the adbidxrebuild command.
- ■ When no values are displayed in the Command_status column (column 17) and the Rerun_command column (column 18)
-
Index rebuild processing has been completed. There is no need to re-execute the adbidxrebuild command.
- #3
-
When the adbidxrebuild command is re-executed, index rebuild processing will be restarted from the beginning.
However, if all indexes to be rebuilt are deleted before the adbidxrebuild command is re-executed, only command termination processing is performed.
- #4
-
When the adbidxrebuild command is re-executed, the command resumes index rebuild processing from the point of B-tree and text index creation processing.
In the following cases, the command resumes index rebuild processing from the point of table data retrieval:
-
The adbidxrebuild command is executed with the --create-temp-file option specified
-
After the adbimport command is stopped, the adbidxrebuild command executed with the --create-temp-file option specified is canceled
In addition, if all indexes to be rebuilt are deleted before the adbidxrebuild command is re-executed, only command termination processing is performed.
-