Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: materialized views in Oracle 9

Re: materialized views in Oracle 9

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 06 Feb 2004 20:48:37 +0100
Message-ID: <for720hgsoqdqvm2mag5ljn6lhksjjkk49@4ax.com>


On Fri, 6 Feb 2004 19:55:39 +0100, Envoy <thenewone_at_freakmail.de> wrote:

>Hi,
>
>I want to use materialized views to speed up my queries. To check if it is working I used the query I
>want to accelerate in the statement to create the m-view.
>
>example:
>Query to accelerate:
> SELECT * FROM student, person
> WHERE s_ID=p_ID
> AND s_sex='female';
>
>m-view definition:
>CREATE MATERIALIZED VIEW Anfr23_MV AS
> SELECT * FROM student, person
> WHERE s_ID=p_ID
> AND s_sex='female';
>
>Unfortunately the view did not help to speed up the query. Furthermore the execution plan did not
>mention the m-view.
>
>What is my mistake?
>Thanks for any help.
>Best regards,
>Michel

First of all if you think you need to use materialized views to speed up simple joins, there is something seriously wrong with your understanding of plan optimization and materialized views.

Secondly, in order for materialized views to operate at all you need to have set
query_rewrite_enabled
to true.
(as documented, of course)

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Feb 06 2004 - 13:48:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US