17.5.10 Types of grouping processing methods

Organization of this subsection
(1) HiRDB/Single Server
(2) HiRDB/Parallel Server

(1) HiRDB/Single Server

(a) Implicit grouping
IMPLICIT MIN-MAX INDEX
This method retrieves only the minimum and the maximum values of the index when determining the set functions MIN and MAX.
IMPLICIT SET FUNCTION SCAN{+}
This method obtains the result of the set function at the same time as retrieving a row.
IMPLICIT NORMAL
This method obtains the result of the set function after retrieving a row.
IMPLICIT LIST SORT{SET FUNCTION SCAN}
If DISTINCT is included in the set function, this method creates a work table and sorts it to eliminate duplicate values before obtaining the result of the set function.
IMPLICIT SURROGATE(COUNT)
This method obtains the result of the set function (number of rows) by using the surrogate function. The surrogate function achieves special processing; that is, it evaluates search conditions by calling a plug-in index and simultaneously determines the result of the set function internally in a plug-in-supplied function to rapidly return the results of the set function.
IMPLICIT SORT CANCEL BY INDEX{SET FUNCTION SCAN}
If the column specified in the DISTINCT set function can be sorted by searching the index without having to perform sort processing for the purpose of eliminating duplicates, this method omits the sort processing and obtains the result of the set function.
(b) Explicit grouping
SORT CANCEL BY INDEX{SET SCAN}
This method skips the sorting for grouping in situations in which the columns to be grouped can be sorted by retrieving their index.
SORT CANCEL BY JOIN
This method skips the sorting for grouping in situations in which the sorting for grouping purposes is cancelled by merge-join sorting.
HASH
This method uses the rapid grouping facility. For details about the rapid grouping facility, see the HiRDB Version 8 UAP Development Guide.
LIST SORT
This method obtains the result of grouping by creating a work table and sorting it.
PRE-SORT JOIN
In situations in which all the columns to be grouped are included in an outer table before it is joined or in an outer-joined table, this method sorts the pre-joined outer table or the result of the outer join, then performs grouping by joining the tables while maintaining their sort order, thereby determining the result of grouping.

(2) HiRDB/Parallel Server

(a) Implicit grouping
IMPLICIT MIN-MAX INDEX
This method retrieves only the minimum and the maximum values of the index on each back-end server when determining the set functions MIN and MAX.
IMPLICIT SET FUNCTION SCAN{+}
This method obtains the result of the set function on each back-end server at the same time as retrieving a row.
IMPLICIT NORMAL
This method obtains the result of the set function after retrieving a row on each back-end server.
IMPLICIT FLOATABLE
This method obtains the results of all set functions by collecting the results on a floatable server.
IMPLICIT FLOATABLE SORT{SET FUNCTION SCAN}
If DISTINCT is included in the set function, this method collects the results on a floatable server, creates a work table, and sorts them to eliminate duplicate values before obtaining the result of the set function.
IMPLICIT SURROGATE(COUNT)
This method determines the result of the set function (number of rows) for each back-end server by using the surrogate function. The surrogate function achieves special processing; that is, it evaluates search conditions by calling a plug-in index and simultaneously determines the result of the set function internally in a plug-in-supplied function to rapidly return the results of the set function.
IMPLICIT SORT CANCEL BY INDEX{SET FUNCTION SCAN}
If the column specified in the DISTINCT set function can be sorted by searching the index without having to perform sort processing for the purpose of eliminating duplicates, this method omits the sort processing and obtains the result of the set function.
IMPLICIT LIST SORT{SET FUNCTION SCAN}
If the set functions include DISTINCT, this method creates a work table at each back-end server, performs sorting to eliminate duplicates, and then obtains the result of the set function.
(b) Explicit grouping
SORT CANCEL BY INDEX{SET SCAN}
This method skips the sorting for grouping in situations in which the columns to be grouped can be sorted by retrieving their index.
SORT CANCEL BY JOIN
This method skips the sorting for grouping in situations in which the sorting for grouping purposes is cancelled by merge-join sorting.
HASH
This method obtains the result of grouping by using the rapid grouping facility. For details about the rapid grouping facility, see the HiRDB Version 8 UAP Development Guide.
LIST SORT
This method obtains the result of grouping by creating a work table on each back-end server and sorting the work table.
PRE-SORT JOIN
In situations in which all the columns to be grouped are included in an outer table before it is joined or in an outer-joined table, this method sorts the table, then performs grouping by joining the tables while maintaining their sort order, thereby determining the result of grouping.
FLOATABLE SORT
This method obtains the result of grouping by transferring data to multiple floating servers, creating a work table, and sorting the data in it.