Oracle9i Replication Management API Reference Release 1 (9.0.1) Part Number A87502-01 |
|
DBMS_MVIEW, 5 of 15
This procedure enables you to learn why a query failed to rewrite, or, if it rewrites, which materialized views will be used. Using the results from the procedure, you can take the appropriate action needed to make a query rewrite if at all possible. The query specified in the EXPLAIN_REWRITE
statement is never actually executed.
To obtain the output into a table, you must run the admin/utlxrw.sq
l script before calling EXPLAIN_REWRITE
. This script creates a table named REWRITE_TABLE
in the current schema.
You can obtain the output from EXPLAIN_REWRITE
in two ways. The first is to use a table, while the second is to create a VARRAY
. The following shows the basic syntax for using an output table:
DBMS_MVIEW.EXPLAIN_REWRITE ( query IN VARCHAR2, mv IN VARCHAR2, statement_id IN VARCHAR2;
If you want to direct the output of EXPLAIN_REWRITE
to a varray, instead of a table, then the procedure should be called as follows:
DBMS_MVIEW.EXPLAIN_REWRITE ( query IN VARCHAR2(2000), mv IN VARCHAR2(30), msg_array IN OUT SYS.RewriteArrayType);
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|