15.00 - Restrictions on Join Index Aggregate Functions - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Restrictions on Join Index Aggregate Functions

The following restrictions apply to aggregate functions used to define aggregate join indexes:

  • Only the COUNT and SUM functions, in any combination, are valid.
  • COUNT DISTINCT and SUM DISTINCT are not valid.
  • To avoid overflow problems, always type the COUNT and SUM columns in a join index definition as FLOAT or DECIMAL(38,0) when the data type of the base table column is INTEGER or FLOAT, and as DECIMAL(38,xx) when the data type of the base table column is DECIMAL(NN,xx).
  •  

    IF you …

    THEN the system …

    do not define an explicit data type for a COUNT or SUM column that has a data type of INTEGER or FLOAT

    assigns the FLOAT data type to it.

    do not define an explicit data type for a COUNT or SUM column that has a data type of DECIMAL

    assigns the DECIMAL(38,xx) data type to it

    define a COUNT or SUM column that has a data type of INTEGER as anything other than FLOAT and DECIMAL(38,0)

    returns an error and does not create the aggregate join index.

    define a COUNT or SUM column that has a data type of DECIMAL as anything other than DECIMAL(38,xx)

    returns an error and does not create the aggregate join index.

    define a COUNT or SUM column that has a data type of FLOAT as anything other than FLOAT

    returns an error and does not create the aggregate join index.