What is the relationship between a materialized view and a table of the same name?

I have an oracle DB with a materialized view that is populated from another oracle DB and refreshed every 2 minutes using DBMS_REFRESH.REFRESH()

.

I just noticed that I have a table with the same name.

  • Does this table contain the same data as the materialized view?
  • Is this table updated every time the materialized view is updated?
  • Is there any official Oracle documentation for this?

thank

+3


source to share


1 answer


If you see both MV

and TABLE

with the same name in the data dictionary view user_objects

, then this is normal behavior. This is how materialized views work. When you create a materialized view, Oracle creates a table that will store the MV data and the MV specification (query and parameters). They both have the same name. So don't be surprised.

Anything missing will be a link to the oracle official docs. :)

I don't think the documentation states this explicitly - there is TABLE

one that supports MV. However, it does so implicitly.



Quote from concept :

A materialized view is the result of a query that has been stored or "materialized" beforehand as schema objects.

Alternatively, a materialized view can be created on a pre-existing table in your schema using the on prebuilt table

operator clause create materialized view

- the names must be the same.

+3


source







All Articles