What are snapshots? What are materialized views & where do we use them? What is a materialized view log?

Showing Answers 1 - 7 of 7 Answers

Manish Kothari

  • Aug 17th, 2005
 

Materialized view is a view in wich data is also stored in some temp table.i.e if we will go with the View concept in DB in that we only store query and once we call View it extract data from DB.But In materialized View data is stored in some temp tables.

  Was this answer useful?  Yes

Pravas

  • Aug 25th, 2005
 

A snapshot is a table that contains the  
results of a query of one or more tables or views, often located on  
a remote database.  

  Was this answer useful?  Yes

ravi kumar guturi

  • Mar 10th, 2006
 

Snapshot is a specific intervel of data,

Meterialized view means it srores precaluculated data,it is a physical representation and it's occupies the space

  Was this answer useful?  Yes

naresh sharma

  • Nov 2nd, 2006
 

Materliazed view log is for audit trail purpose on table. This concept was introcuded in Oracle 9. Thsi will help to trace the record based on it's dml operation.

  Was this answer useful?  Yes

A Materialized View is just that.  A view which has been materialized to become a "table".

The big difference between a View and a Materialized View, is a View executes a query on-the-fly to return results.  A Materialized View executes a query, but then stores (or caches) the results.  You can then query the MVIEW.

This means once a Materialized view has been built, queries can run significantly faster then if they were run on-the-fly directly against the underlying data.

This performance benefit makes MVIEWS particularly suitable for creating aggregates (summaries of fact tables).  You could for example, build a daily and monthly summary of sales records from a fact table of Sales Transactions.

One further benefit of MVIEWS is that (in Oracle 9i upwards) they can take part in the Query Rewrite option.  This means a query to sum the sales by year (which doesn’t directly exist as an MVIEW) could be automatically re-written by Oracle to query the monthly summary rather than the underlying data.  Automatically improving performance.

Finally MVIEWS can also be refreshed either entirely or with just the changes – depending how they were designed, and you can build indexes on MVIEWS.

MVIEWS can be used for almost any purpose (but most often for query performance), it has nothing specifically to do with audit trail on DML operations.  This is a complete misunderstanding.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions