| Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The ADVISE_SPARSITY procedure analyzes a fact table for sparsity using information about its dimensions provided by the ADD_DIMENSION_SOURCE procedure. It populates a table created by the SPARSITY_ADVICE_TABLE procedure with the results of its analysis.
Note:
You cannot execute this procedure from within the OLAP Worksheet. You must execute if in a SQL tool such as SQL*Plus.See also:
"Using the Sparsity Advisor"Output Description
Table B-9 describes the information generated by ADVISE_SPARSITY.
Table B-9 Output Column Descriptions
| Column | Data Type | NULL | Description |
|---|---|---|---|
|
|
|
|
The values of cubename in calls to |
|
|
|
|
The values of fact in calls to |
|
|
|
|
The logical names of the cube's dimensions; the dimensions described in calls to |
|
|
|
The names of dimension columns in fact (the source fact table), which relate to a dimension table. |
|
|
|
|
The names of the dimension tables. |
|
|
|
|
The total number of dimension members at all levels. |
|
|
|
|
The number of dimension members at the leaf (or least aggregate) level. |
|
|
|
|
|
The sparsity evaluation of the dimension: |
|
|
|
|
The recommended order of the dimensions. |
|
|
|
A number that provides an indication of sparsity relative to the other dimensions. The larger the number, the more sparse the dimension. |
|
|
|
|
|
The number of the partition described in the |
|
|
|
A list of all dimension members that should be stored in this partition. This list is truncated in SQL*Plus unless you significantly increase the size of the |
|
|
|
|
A list of top-level dimension members for this partition. |
Syntax
ADVISE_SPARSITY (
fact IN VARCHAR2,
cubename IN VARCHAR2,
dimsources IN dbms_aw$_dimension_sources_t,
advmode IN BINARY_INTEGER DEFAULT ADVICE_DEFAULT,
partby IN BINARY_INTEGER DEFAULT PARTBY_DEFAULT,
advtable IN VARCHAR2 DEFAULT NULL);
Parameters
Table B-10 ADVISE_SPARSITY Procedure Parameters
| Parameter | Description |
|---|---|
|
|
The name of the source fact table. |
|
|
A name for the facts being analyzed, such as the name of the logical cube in the analytic workspace. |
|
|
The name of the object type where the |
|
|
The level of advise you want to see. Select one of the following values: DBMS_AW.ADVICE_DEFAULTDBMS_AW.ADVICE_FASTDBMS_AW.ADVICE_FULL |
|
|
A keyword that controls partitioning. Use one of the following values:
|
|
|
The name of a table created by the procedure for storing the results of analysis. |
Example
The following PL/SQL program fragment analyzes the sparsity characteristics of the UNITS_HISTORY_FACT table.
DECLARE
dimsources dbms_aw$_dimension_sources_t;
BEGIN
-- Calls to ADD_DIMENSION_SOURCE for each dimension in the cube
.
.
.
dbms_aw.advise_sparsity('units_history_fact', 'units_cube', dimsources,
dbms_aw.advice_default);
END;
/
The following SELECT command displays the results of the analysis, which indicate that there is one denser dimension (CHANNEL) and three comparatively sparse dimensions (PRODUCT, CUSTOMER, and TIME).
SQL> SELECT fact, dimension, dimcolumn, membercount nmem, leafcount nleaf, advice, density
FROM aw_sparsity_advice
WHERE cubename='units_cube';
FACT DIMENSION DIMCOLUMN NMEM NLEAF ADVICE DENSITY
-------------------- ------------ ------------ ----- ------ ------------ ----------
units_history_fact channel channel_id 3 3 DENSE .86545382
units_history_fact product item_id 36 36 SPARSE .98706809
units_history_fact customer ship_to_id 61 62 SPARSE .99257713
units_history_fact time month_id 96 80 SPARSE .99415964