Scalable Database Server, HiRDB Version 8 Description

[Contents][Glossary][Index][Back][Next]

5.10.2 Rapid grouping facility

When the GROUP BY clause of an SQL is used for grouping, sorting is performed before grouping. The facility for combining this grouping with hashing to achieve rapid grouping is called the rapid grouping facility. This facility can reduce the amount of time required for grouping when the number of groups is small and there is a large number of rows to be grouped.

Specifying the rapid grouping facility
To specify the rapid grouping facility, use an SQL optimization option, such as one of the following operands:
  • pd_optimize_level system definition operand
  • PDSQLOPTLVL client environment definition
  • CREATE PROCEDURE, CREATE TRIGGER, CREATE TYPE, ALTER PROCEDURE, ALTER ROUTINE, or ALTER TRIGGER SQL optimization options

For details about the pd_optimize_level operand, see the HiRDB Version 8 System Definition. For specification of the PDSQLOPTLVL statement and details of the rapid grouping facility, see the HiRDB Version 8 UAP Development Guide.