Hitachi

Hitachi Advanced Database Setup and Operation Guide


10.9.6 Checking the usage of DB area files

When you acquire DB area usage information, you can check the usage of tables and indexes in a DB area and the usage of each DB area file.

Example of the command to be executed

This example outputs usage information for DB area DBAREA01:

adbdbstatus -d used -c dbarea -n DBAREA01 -S M --shared-lock

Executing this command outputs usage information for DB area DBAREA01 to the standard output. The following are the items to be checked in the results that are output by the adbdbstatus command:

Organization of this subsection

(1) Checking the usage per table or index

Using the values output under Object_type, Schema_name, and Object_identifier as keys, check the value output under MB_Used_pages.

Checking the usage of a table

Check the values output under Schema_name and Object_identifier for a target table, and make sure the Object_type value is table. Using the values output under Schema_name and Object_identifier as keys, check the values output under MB_Used_pages. You can use this information to determine the usage (in megabytes) of the target table.

If the same Schema_name and Object_identifier values exist in multiple rows for the target table, total all of the corresponding values output under MB_Used_pages. The totaled result is the usage of the table.

Checking the usage of an index

Check the values output under Schema_name and Object_identifier for a target index, and make sure that the Object_type value is index. Using the values output under Schema_name and Object_identifier as keys, check the values output under MB_Used_pages. You can use this information to determine the usage (in megabytes) of the target index.

If the same Schema_name and Object_identifier values exist in multiple rows for the target index, total all of the corresponding values output under MB_Used_pages. The totaled result is the usage of the index.

Note

When you specify the --shared-lock option for the adbdbstatus command, segment-related information is not output for the deletion-pending chunks that correspond to system tables (base tables) and the indexes defined in the system tables (base tables).

(2) Checking the usage rate of a DB area file

Using a value output under DBarea_filename as a key, check the associated values output under MB_Total_segments and MB_Used_segments. You can use the following formula to determine the usage rate of each DB area file.

Formula (%)
(MB_Used_segments ÷ MB_Total_segments) × 100

If the result determined using the formula is close to 100%, consider one of the following corrective measures based on the type of DB area file:

When the DB area file is a block special file

If you continue to store data when the value is close to 100%, the DB area file might become full. Therefore, consider allocating free space on the disk that stores block special files based on the explanation in 15.3.1 When a free space shortage is caused by an increase in the size of the DB area files.

When the DB area file is a regular file

If you continue to store data when the value is close to 100%, the DB area will be extended automatically. When automatic extension occurs, the size of the DB area will automatically increase, but the performance of update processing while DB area file expansion is underway will decline. If DB area automatic extension fails, see 15.3.2 When a free space shortage is caused by failed DB area automatic extension.

For the system-table DB area file, also consider that you execute the adbreorgsystemdata command, in addition to take the preceding actions. By executing the adbreorgsystemdata command to reorganize the system table, you can secure free disk space. For details about reorganizing the system table, see 11.17 Reorganizing system tables.

(3) Checking the usage of a DB area file

Using the value output under DBarea_filename as the key, check the value output under MB_Used_segments. You can determine the size of the area (in megabytes) that is being used to store data in each DB area file.