There are some constructs in a view that prevent it from being
updatable, such as having a distinct operator, an aggregate function, or a group by clause.
When Oracle processes a query containing a view, it substitutes the underlying query
definition in the user??™s select statement and processes the resulting query as if the view did not
exist. As a result, the benefits of any existing indexes on the base tables are not lost when a view
is used.
Materialized Views
In some ways, a materialized view is very similar to a regular view: The definition of the view is
stored in the data dictionary, and the view hides the details of the underlying base query from the
user. That is where the similarities end. A materialized view also allocates space in a database
segment to hold the result set from the execution of the base query.
You can use a materialized view to replicate a read-only copy of table to another database,
with the same column definitions and data as the base table. This is the simplest implementation
of a materialized view. To enhance the response time when a materialized view needs to be
refreshed, a materialized view log can be created to refresh the materialized view. Otherwise, a
full refresh is required when a refresh is required??”the results of the base query must be run in
their entirety to refresh the materialized view. The materialized view log facilitates incremental
updates of the materialized views.
Pages:
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87