Considerations in Using Aggregate Range Routines

Performance Advantages in Using the Aggregate Range APIs

The aggregate range routines were designed to give you performance advantages over using the E@DBFINDSUBRNG and E@DBFINDNXTRNG calls. When you use the aggregate range routines, you improve processing time by using the power of the relational database management system (RDBMS). Because the RDBMS includes all data retrieval and math functions, using the aggregate range routines eliminates the overhead associated with individual table fetches.

Constraints on Using the Aggregate Range APIs

Only the stored field types CURRENCY, NUMERIC, PERCENT, and SIGNED are supported.

You may only specify one aggregate function, regardless of the number of fields to which it is applied. For example, AVG and SUM cannot be processed in the same request.

Aggregate Overflow APIs

A set of aggregate overflow APIs is available. The aggregate overflow APIs differ from the other aggregate APIs in that they check whether the value returned from the aggregate processing would overflow the field in which it would be stored. If the value is too large, the overflow API does not update the field and instead sets a flag to indicate that an overflow has occurred.