Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-03 |
|
|
PDF · Mobi · ePub |
Compiling the aggmap object is important for aggregation performed at run-time using the AGGREGATE function. Unless the compiled version of the aggmap has been saved, the aggmap is recompiled by each session that uses it.
There are two ways you can compile an aggmap objects:
Issue a COMPILE statement.
A COMPILE statement is the only way to compile an aggmap object that will be used by an AGGREGATE function. Explicitly compiling an aggmap is also useful for finding syntax errors in the aggmap before attempting to use it to generate data. The following statement compiles the sales.agg
aggmap.
COMPILE gpct.aggmap
When you aggregate the data using an AGGREGATE command, include the FUNCDATA phrase in the statement.
When you use the FUNCDATA phrase in an AGGREGATE command, Oracle OLAP compiles the aggmap before it aggregates the data. For example, this statement compiles and precalculates the aggregate data.
AGGREGATE sales USING gpct.aggmap FUNCDATA
Important:
When some of the data is calculated on the fly, then you must compile and save the aggmap after executing the AGGREGATE command.