Hitachi

Hitachi Advanced Database Application Development Guide


5.4.2 Evaluation method when range indexes are used

When range indexes are used, the search conditions are evaluated according to the following two range index conditions:

Note

For details about skipping chunks and segments, see Range indexes in the HADB Setup and Operation Guide.

Organization of this subsection

(1) Example of skipping chunks by using range indexes

The following provides an example of skipping chunks by using range indexes.

[Figure]

[Figure]

Explanation:

The following describes the procedure for retrieval processing.

  1. Before accessing chunks, HADB evaluates the range index condition used to skip chunks.

    • Range index condition used to skip chunks: 100≤C1≤300, C2 IN(1, 2), C3<300

  2. HADB evaluates the search condition and key condition based on the B-tree indexes of the search target chunks.

    • Search condition: 100≤C1≤300

    • Key condition: C2 IN(1,2)

  3. HADB accesses the data page and evaluates the remaining search condition.

    • Search condition to be evaluated after the data page is accessed: C3<300

Note that range indexes defined in columns C1, C2, and C3 are not used to skip a segment.

(2) Example of skipping segments by using range indexes

The following provides an example of skipping segments by using range indexes.

[Figure]

[Figure]

Explanation:

The following describes the procedure for retrieval processing.

  1. Before accessing chunks, HADB evaluates the range index condition used to skip chunks.

    • Range index condition used to skip chunks: 100≤C1≤110

  2. HADB evaluates the range index condition used to skip segments in the search target chunk.

    • Range index condition used to skip segments: 100≤C1≤110

  3. HADB accesses the data page and evaluates the search condition.

    • Search condition to be evaluated after the data page is accessed: C2 IN(1,2)