Browse Prior Art Database

Efficient Way to Evaluate Aggregate Functions

IP.com Disclosure Number: IPCOM000100297D
Original Publication Date: 1990-Mar-01
Included in the Prior Art Database: 2005-Mar-15
Document File: 2 page(s) / 41K

Publishing Venue

IBM

Related People

Haderle, DJ: AUTHOR [+3]

Abstract

The query language of a relational database system usually supports several types of functions. Aggregate functions are those that are applied to groups of tuples and return a single result for each group. These groups are specified in the query language through the GROUP BY clause.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 70% of the total text.

Efficient Way to Evaluate Aggregate Functions

       The query language of a relational database system
usually supports several types of functions.  Aggregate functions are
those that are applied to groups of tuples and return a single result
for each group.  These groups are specified in the query language
through the GROUP BY clause.

      Certain aggregate functions can be evaluated immediately after
the data has been retrieved, reducing the CPU resource consumption of
the query.  This can be done for certain queries that have simple
aggregate functions in which only a single column is input to the
function.  This would include COUNT(*).  The aggregate functions
which can be evaluated in this way are as follows.
      Case #1   There is a single table in the query;
           -    a GROUP BY clause; and
           -    all predicates are simple predicates.
      Case #2   There is a single table in the query;
           -    a GROUP BY clause;
           -    all predicates are simple predicates; and
           -    the access method for the query provides the
               same ordering as that of the GROUP BY clause.
      Case #3   There are multiple tables in the query;
           -    no GROUP BY clause;
           -    all functions are on the innermost table; and
           -    all predicates that reference th...