10.9.3 Checking the status and usage of a B-tree index
If you acquire index summary information by using the adbdbstatus command, you can check the status and usage of a B-tree index.
- Organization of this subsection
(1) Checking whether a B-tree index is in unfinished status
To check whether a B-tree index is in unfinished status, execute the following adbdbstatus command.
- Example of the command to be executed
-
This example outputs summary information for B-tree index ADBUSER01.IDX1.
adbdbstatus -d summary -c index -n ADBUSER01.IDX1
Executing the adbdbstatus command outputs summary information for B-tree index ADBUSER01.IDX1 to the standard output.
Check the value output under Unfinished in the summary information for the index. If unfinished is output, the B-tree index is in unfinished status.
To release the B-tree index from unfinished status, see 15.9.1 Steps to take when unfinished status is applied to a B-tree index.
(2) Checking whether a unique index violates the uniqueness constraint
To check whether a unique index violates the uniqueness constraint, execute the following adbdbstatus command.
- Example of the command to be executed
-
This example outputs summary information for B-tree index ADBUSER01.IDX1.
adbdbstatus -d summary -c index -n ADBUSER01.IDX1
Executing the adbdbstatus command outputs summary information for B-tree index ADBUSER01.IDX1 to the standard output.
Check the value output under Unique_constraint_violated in the summary information for the index.
-
If unique_constraint_violated is output, the B-tree index is in violation of the uniqueness constraint. To release the uniqueness constraint violation, see (2) Steps to take when the uniqueness constraint is violated in 15.9.2 Steps to take when the uniqueness constraint is violated (when the KFAA61205-W message is output).
-
If unknown is output, it cannot be determined whether the B-tree index is in uniqueness constraint violation. After using the adbidxrebuild command to rebuild the B-tree index, re-execute the adbdbstatus command to determine whether the uniqueness constraint has been violated.
For details about the adbidxrebuild command, see adbidxrebuild (Rebuild Indexes) in the manual HADB Command Reference.
(3) Checking the usage of a B-tree index
To check the usage of a B-tree index, execute the following adbdbstatus command.
- Example of the command to be executed
-
This example outputs summary information for B-tree index ADBUSER01.IDX1.
adbdbstatus -d summary -c index -n ADBUSER01.IDX1 -S M --shared-lock
Executing the adbdbstatus command outputs summary information for B-tree index ADBUSER01.IDX1 to the standard output.
Check the value output under MB_Used_pages in the summary information for the index. You can determine the size of the area (in megabytes) being used by the B-tree index data stored in the DB area.