Hitachi

Hitachi Advanced Database Application Development Guide


5.9.3 Characteristics of the methods for processing SELECT DISTINCT

The following table shows the characteristics of each method for processing SELECT DISTINCT.

Table 5‒10: Characteristics of the methods for processing SELECT DISTINCT

Method for processing SELECT DISTINCT

Benefits

Disadvantages

Hash execution

Results can be obtained at a higher speed when the data required for executing SELECT DISTINCT can be stored in the hash table area.

If a shortage occurs in the hash table area due to a large amount of data required for executing SELECT DISTINCT, processing performance decreases because the data is temporarily saved in a work table.

Work table execution

This method is applicable to any SELECT DISTINCT.

If there are a large number of retrieval results, the amount of data stored in the work table becomes large. In this case, processing performance decreases because deduplication is performed after the data stored in the work table is sorted.