Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_MVIEW, 4 of 15
This procedure enables you to learn what is possible with a materialized view or potential materialized view. For example, you can determine if a materialized view is fast refreshable and what types of query rewrite you can perform with a particular materialized view.
Using this procedure is straightforward. You simply call DBMS_MVIEW
.EXPLAIN_MVIEW
, passing in as parameters the schema and materialized view name for an existing materialized view. Alternatively, you can specify the SELECT
string for a potential materialized view. The materialized view or potential materialized view is then analyzed and the results are written into either a table called MV_CAPABILITIES_TABLE
, which is the default, or to an array called MSG_ARRAY
.
Note that you must run the utlxmv.sql
script prior to calling EXPLAIN_MVIEW
except when you direct output to a VARRAY
. The script is found in the admin directory. In addition, you must create MV_CAPABILITIES_TABLE
in the current schema.
The following PL/SQL declarations that are made for you in the DBMS_MVIEW
package show the order and datatypes of these parameters for explaining an existing materialized view and a potential materialized view with output to a table and to a VARRAY
.
To explain an existing or potential materialized view with output to MV_CAPABILITIES_TABLE:
DBMS_MVIEW.EXPLAIN_MVIEW ( mv IN VARCHAR2, statement_id IN VARCHAR2:= NULL);
To explain an existing or potential materialized view with output to a VARRAY
:
DBMS_MVIEW.EXPLAIN_MVIEW ( mv IN VARCHAR2, msg_array OUT SYS.ExplainMVArrayType);
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|