Skip Headers
Previous
Previous
 
Next
Next

Analyzing Cubes and Dimensions

If your application executes queries directly against a single cube, you do not need to generate optimizer statistics for the cube. These queries are automatically optimized within the analytic workspace.

Optimizer statistics are used to create execution plans for queries that join two cube views or join a cube view to a table or a view of a table. You must generate the statistics only for these types of queries.

To generate optimizer statistics, use the DBMS_AW_STATS PL/SQL package. Generating the statistics does not have a significant performance cost.

DBMS_AW_STATS has the following syntax:

DBMS_AW_STATS.ANALYZE
     (object       IN VARCHAR2);

The argument can be either a cube or a dimension. Example: Generating Statistics for the Units Cube shows a sample script for generating statistics on the Units cube and its dimensions.

Generating Statistics for the Units Cube

BEGIN
     DBMS_AW_STATS.ANALYZE('units_cube');
     DBMS_AW_STATS.ANALYZE('time');
     DBMS_AW_STATS.ANALYZE('customer');
     DBMS_AW_STATS.ANALYZE('product');
     DBMS_AW_STATS.ANALYZE('channel');
END;
/

Although you cannot view the statistics directly, you can examine the execution plans.