GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  ETL
Go To First  |  Previous Question  |  Next Question 
 ETL  |  Question 24 of 65    Print  
What are snapshots? What are materialized views & where do we use them? What is a materialized view log?

  
Total Answers and Comments: 5 Last Update: May 01, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: jryan999
 

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.



Above answer was rated as good by the following members:
DWH01, butair
August 17, 2005 15:27:21   #1  
Manish Kothari        

RE: What are snapshots? What are materialized views & where do we use them? What is a materialized view ...
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.
 
Is this answer useful? Yes | No
August 25, 2005 07:24:33   #2  
Pravas        

RE: What are snapshots? What are materialized views & where do we use them? What is a materialized view ...
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.

 
Is this answer useful? Yes | No
March 10, 2006 04:25:51   #3  
ravi kumar guturi        

RE: What are snapshots? What are materialized views & ...

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


 
Is this answer useful? Yes | No
November 02, 2006 04:12:25   #4  
naresh sharma        

RE: What are snapshots? What are materialized views & ...
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.
 
Is this answer useful? Yes | No
May 01, 2008 07:50:26   #5  
jryan999 Member Since: April 2008   Contribution: 15    

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

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.


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape