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 exact same data as the materialized view?
- Is this table also refreshed every time the materialized view is refreshed?
- Is there any official Oracle documentation for this?
Thanks
If you see both an
MV
and aTABLE
with the same name in theuser_objects
data dictionary view, then It's normal behavior. That's how materialized views work. When you create a materialized view Oracle creates a table, that is going to hold MV's data, and MV specification(query and options). They both have the same name. So do not be surprised.I do not think that the documentation states it explicitly - there is a
TABLE
that underpins an MV. However it does it implicitly.Quote from the concept:
Moreover, materialized view can be created on an already existing table in your schema using
on prebuilt table
clause of thecreate materialized view
statement - names should be the same.