Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Aggregating Data Using the OLAP DML

To aggregate data using the OLAP DML, take the following steps:

  1. Decide if you want to aggregate all of the data as a database maintenance procedure using the AGGREGATE command or on-the-fly at runtime using the AGGREGATE function or the $AGGMAP property, or if you want to combine these approaches and precalculate some values and calculate others at run time. For a discussion of the various approaches, see "Executing the Aggregation".

  2. Issue a DEFINE AGGMAP statement to define the aggmap object as type AGGMAP.

  3. Write the aggregation specification as described in AGGMAP.

  4. When aggregating a partitioned variable, run PARTITIONCHECK to check that the aggregation specification created in the previous step is compatible with the variable's partitioning. If it is not, either rewrite the aggregation specification or repartition the variable using CHGDFN.

  5. When some or all of the data is to be aggregated using the AGGREGATE function:

    1. Compile the aggmap object as described in "Compiling Aggregation Specifications".

    2. Add the triggering property, object, or event. For example, add a formula that has the AGGREGATE function as its expression and add $NATRIGGER property to the variable to trigger the execution of that formula in response to a runtime request for data.

  6. When you want the aggmap object to be a permanent part of the analytic workspace, save the aggmap object using an UPDATE statement followed by COMMIT.

  7. For data that is to be calculated using the AGGREGATE command:

    1. (Optional) Set the POUTFILEUNIT option so that you can monitor the progress of the aggregation.

    2. Use the AGGREGATE command, followed by UPDATE and COMMIT to precalculate the data and store it in the analytic workspace.

For brief descriptions of all of the OLAP DML statements that relate to aggregation, see "Aggregation Statements".