Hitachi

Hitachi Advanced Database Setup and Operation Guide


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.

(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.