Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    58

    Question Unanswered: Materialized View question

    I just googled the following about Materialized Views ...

    "When they are used within a database, they are used much like an index; for performance. In addition, like an index, they should be able to be dropped without affecting an existing query. In other words, your code should not be dependant upon their existence."

    Does this mean that I should not create a regular view or procedure that explicitly references a materialized view that I created?

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Could you post a link to this document?

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by tomstone_98
    I just googled the following about Materialized Views ...

    "When they are used within a database, they are used much like an index; for performance. In addition, like an index, they should be able to be dropped without affecting an existing query. In other words, your code should not be dependant upon their existence."

    Does this mean that I should not create a regular view or procedure that explicitly references a materialized view that I created?

    Thanks.
    Since most of my usage of MVIEWS is in a WAN environment, I have never depended on query rewrite and almost always reference the mviews directly.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    That's why I'd like to see the context of the posted sentence.

  5. #5
    Join Date
    May 2007
    Location
    San Francisco Bay Area
    Posts
    1
    You do not need to reference a materialized view in your query. The optimizer can automatically find the MV by comparing your SQL query and the view definition.

    However, you, of course, can reference the view directly. Actually, if you don't enable the query rewrite for a given view, the view won't be used for rewriting queries.

    Dylan
    dylanwan.wordpress.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •