contactmatt
contactmatt

Reputation: 18600

Oracle - Updating Materialized Views

How can I update a materialized view? Is there any downside to updating materialized views? I'm in a situation where I can either

  1. Update the materialized view (OR)
  2. Copy the records to another table, update them, truncate or drop the materialized view table, insert the updated records back into the materialized view.

These two options revolve around the long amount of time required to rebuild the materialized view (literally 5+ days).

Version : Oracle 10g

Upvotes: 2

Views: 6202

Answers (1)

user123664
user123664

Reputation:

The intention of a materialized view is to store the results of some complex long running query that the query rewrite mechanism can use to save lots of time. It looks like the sql that is used to build the MV needs some tweeking.

You cannot update an MV, unless you meant doing a full/fast refresh/rebuild.

What is eating the time in during the MV refresh? Did you check the addm reports? Did you configure full or fast refreshes?

Upvotes: 2

Related Questions