Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.3.8 Changing the data DB area that stores indexes

To change the data DB area that stores indexes to another data DB area, you must first delete the indexes, and then redefine the indexes. After that, you must rebuild the indexes.

Note

For details about how to change the data DB area that stores a base table to another data DB area, see 11.1.14 Changing the data DB area that stores a base table.

By using the procedure shown later, change the data DB area that stores indexes to another data DB area.

You might also want to add a new data DB area. For details, see 11.10.1 Adding data DB areas. After seeing the subsection and taking action, change the data DB area that stores indexes.

Procedure

  1. Check the definition information of the indexes.

    Check the specification content of the CREATE INDEX statement that was used to define the indexes for the base table. You will use the specification content when you redefine indexes for the base table.

    If you are not sure of the specification content of the CREATE INDEX statement that was used to define the indexes, see (29) Finding out index definition information in B.22 Searching a dictionary table. By retrieving data from a dictionary table, you can check the specification content of the CREATE INDEX statement that was used to define the indexes.

  2. Delete the indexes.

    Use the DROP INDEX statement to delete the indexes.

  3. Redefine indexes.

    Use the CREATE INDEX statement to redefine indexes for the base table. Note the following points when you create a CREATE INDEX statement:

    • Create a CREATE INDEX statement with the specification content of the CREATE INDEX statement that was used to define the indexes (the specification content you checked in step 1).

    • Specify the DB area name of another data DB area that will store the indexes for IN DB-area-name in the CREATE TABLE statement.

  4. Rebuild indexes.

    Use the adbidxrebuild command to rebuild the indexes you defined in step 3.

The procedure for changing a data DB area that stores indexes to another data DB area is complete.

Note
  • For details about the adbidxrebuild command, see the manual HADB Command Reference.

  • For details about the DROP INDEX and CREATE INDEX statements, see the manual HADB SQL Reference.