A List: Things That Materialized Views Can Be (Philisophically) Similar To
When is a materialized view like a ... ?:
- Constraint: When you use it to enforce a multirow constraint, such as "SUM(allocation_pct) per Site = 100", which is not supported through regular constraints. Better then triggers because MV's refresh on commit, not on DDLoperations themselves.
- Index: When you use it to speed a full scan of a subset of a table's columns .
- Partition: When a materialized view selects a subset of a table's rows, thus making the subset accessible through multiblock reads instead of single block index-based access, and without requiring the whole of the original table to be scanned.
- New Set Of Unbelievably Fast Disks: When a materialized view with query rewrite allows a large data set to be pre-aggregated and subsequently queried in almost no time at all.
- Trigger: When you stop trying to enforce multirow constraints with triggers and start using materialized views instead.
- Synonym: When it allows you to give an alternative name to a table.
- Time Machine: When a stale materialized view shows you the previous state of a table's data. A materliazed view log then gives you an audit trail of sorts for changes since the last refresh*
* Thanks Gary
3 Comments:
A time-machine.
An unrefreshed materialized view can show what the data used to look like.
And if you are using materialized view logs, you get a [sort of] audit trail of changes thrown in for free.
Ooooo, that's nice.
I'll add that to the list, if that's ok.
How about a load mechanism? MV is defined as SELECT * FROM external_table. DBMS_MVIEW.REFRESH(mv). Job done.
Post a Comment
<< Home