Hitachi

Hitachi Advanced Database Setup and Operation Guide


2.15.3 Searching an archivable multi-chunk table

When an archivable multi-chunk table is defined, a range index is automatically defined for the archive range column. A location table is also automatically created.

The following describes the archive range column and location table.

Organization of this subsection

(1) Archive range column

The HADB server manages the range (maximum and minimum values) of data that is stored in an archivable multi-chunk table for each chunk. The range of data managed for each chunk can be used to narrow down the search range. Therefore, although the amount of data that has been managed for a long term is large, you can perform a search for only the data you need.

A column that contains data and is used to narrow down the search range is called the archive range column.

Any archivable multi-chunk table requires a column that is to be used as the archive range column. For example, a column that contains datetime data or numeric data can be used as the archive range column.

For the archive range column, the HADB server automatically defines a range index. The HADB server manages the range (maximum and minimum values) of data stored in the archive range column for each chunk that has not been archived.

The following figure shows an overview of the archive range column.

Figure 2‒54: Overview of the archive range column (if a date data column is used as the archive range column)

[Figure]

(2) Location table

When an archivable multi-chunk table is defined, the HADB server automatically defines a location table and the index for the location table. A location table is a table that the system uses to manage the information about archived chunks. The following shows the information that is managed by using a location table.

Information managed by using a location table
  • Chunk IDs

  • Paths of archive files

  • Range of values (maximum and minimum values) in the archive range column of each archive file

The index data of a chunk is excluded when the chunk is archived. Therefore, the data in an archived chunk cannot be searched by using an index. Instead, the search range can be narrowed down by managing the data of the archive range column in a location table.

The following figure shows an overview of a location table.

Figure 2‒55: Overview of a location table

[Figure]

Note
  • Location tables are used by the HADB server and are not used by users.

  • One location table is created for each archivable multi-chunk table.

  • The location table for an archivable multi-chunk table and the index defined for that location table are stored in the data DB area that stores the archivable multi-chunk table.

When the data in an archivable multi-chunk table is searched, the HADB server narrows down the search-target archive files based on the data stored in the archive range column. For details, see Considerations when searching an archivable multi-chunk table in Designs Related to Improvement of Application Program Performance in the HADB Application Development Guide.