DBMS_OLAP Package
The DBMS_OLAP package provides a collection of materialized view analysis and advisory functions that are callable from any PL/SQL program.

Some of the functions generate output tables. DBMS_OLAP performs seven major functions, which include materialized view strategy recommendation, materialized view strategy evaluation, reporting and script generation, repository management, workload management, filter management, and dimension validation.

DBMS_OLAP.ALTER_FILTER_ITEM

This procedure adds a new filter item to an existing filter to make it more restrictive. It also creates a filter to restrict what is analyzed for the workload.
Syntax: ADD_FILTER_ITEM (filter_id    IN NUMBER, filter_name  IN VARCHAR2, string_list  IN VARCHAR2, number_min   IN NUMBER, number_max   IN NUMBER, date_min     IN VARCHAR2, date_max  IN VARCHAR2);


DBMS_OLAP.CREATE_ID

This procedure creates a unique identifier, which is used to identify a filter, a workload or results of an advisor or dimension validation run.
Syntax: DBMS_OLAP.CREATE_ID ( id OUT NUMBER);

DBMS_OLAP.ESTIMATE_MVIEW_SIZE

This procedure estimates the size of a materialized view that you might create, in bytes and number of rows.
Syntax: DBMS_OLAP.ESTIMATE_MVIEW_SIZE (stmt_id  IN  VARCHAR2,  select_clause IN  VARCHAR2,  num_rows      OUT NUMBER, num_bytes     OUT NUMBER);

DBMS_OLAP.EVALUATE_MVIEW_STRATEGY

This procedure measures the utilization of each existing materialized view based on the materialized view usage statistics collected from the workload. The workload_id is optional. If not provided, EVALUATE_MVIEW_STRATEGY uses a hypothetical workload.
Syntax: DBMS_OLAP.EVALUATE_MVIEW_STRATEGY ( run_id  IN NUMBER, workload_id   IN NUMBER, filter_id     IN NUMBER);

DBMS_OLAP.GENERATE_MVIEW_REPORT

This procedure generates an HTML-based report on the given Advisor run.
Syntax: DBMS_OLAP.GENERATE_MVIEW_REPORT (filename     IN VARCHAR2,  id IN NUMBER, flags IN NUMBER);


DBMS_OLAP.GENERATE_MVIEW_SCRIPT

This procedure generates a simple script containing the SQL commands to implement Summary Advisor recommendations.
Syntax:  DBMS_OLAP.GENERATE_MVIEW_SCRIPT(filename IN VARCHAR2, id IN NUMBER,  tspace IN VARCHAR2); 

DBMS_OLAP.LOAD_WORKLOAD_CACHE

This procedure loads a SQL cache workload.
Syntax:  DBMS_OLAP.LOAD_WORKLOAD_CACHE ( workload_id  IN NUMBER, flags IN NUMBER,  filter_id  IN NUMBER, application  IN VARCHAR2, priority     IN NUMBER);

DBMS_OLAP.LOAD_WORKLOAD_TRACE

This procedure loads an Oracle Trace workload.
Syntax: DBMS_OLAP.LOAD_WORKLOAD_TRACE (workload_id  IN NUMBER, flags IN NUMBER, filter_id    IN NUMBER, application  IN VARCHAR2, priority     IN NUMBER, owner_name   IN VARCHAR2);

DBMS_OLAP.LOAD_WORKLOAD_USER

This procedure loads a user-defined workload.
Syntax: DBMS_OLAP.LOAD_WORKLOAD_USER (workload_id   IN    NUMBER, flags IN NUMBER, filter_id IN NUMBER, owner_name    IN    VARCHAR2, table_name    IN    VARCHAR2);

DBMS_OLAP.PURGE_FILTER

This procedure removes a filter at any time. You can delete a specific filter or all filters.
Syntax: DBMS_OLAP.PURGE_FILTER ( filter_id    IN    NUMBER);

DBMS_OLAP.PURGE_RESULTS

Many procedures in the DBMS_OLAP package generate output in system tables, such as results for RECOMMEND_MVIEW_STRATEGY and evaluation results for VALUATE_MVIEW_STRATEGY , and dimension validation results for VALIDATE_DIMENSION. When these outputs are no longer required, they should be removed using the procedure PURGE_RESULTS. You can remove all results or those for a specific run.
Syntax: DBMS_OLAP.PURGE_RESULTS ( run_id    IN   NUMBER);

DBMS_OLAP.PURGE_WORKLOAD

This procedure removes workloads when they are no longer needed. You can delete all workloads or a specific collection.
Syntax:  DBMS_OLAP.PURGE_WORKLOAD (workload_id   IN   NUMBER);

Other Procedures available in this package include:
DBMS_OLAP.RECOMMEND_MVIEW_STRATEGY
DBMS_OLAP.SET_CANCELLED
DBMS_OLAP.VALIDATE_DIMENSION
DBMS_OLAP.VALIDATE_WORKLOAD_CACHE
DBMS_OLAP.VALIDATE_WORKLOAD_TRACE
DBMS_OLAP.VALIDATE_WORKLOAD_USER