Hitachi

Hitachi Advanced Database Application Development Guide


5.7.3 Characteristics of each type of grouping

The following table describes the characteristics of each type of grouping.

Table 5‒8: Characteristics of each type of grouping

No.

Grouping type

Benefits

Disadvantages

1

Hash grouping

Local hash grouping

Grouping is performed at a higher speed if the data required for grouping can fit in the hash grouping area for each SQL processing real thread, such as when there are only a few groups.

Processing performance decreases when there are many groups.

2

Global hash grouping

Grouping is performed at a higher speed if the data required for grouping can fit in the hash table area.

Processing performance decreases when grouping requires a large amount of data, and a shortage of space occurs in the hash table area, because the data is first stored in the work table.

3

Sort grouping

Grouping is possible even if no hash grouping area or hash table area is allocated.

If there are many retrieval results, a large amount of data is stored in the work table. Processing performance decreases because the data stored in the work table is sorted, and then is grouped.