Search This Blog

Saturday, December 1, 2012

Materialized Views in SQL Server


Materialized Views
  1. In SQL, a view is a virtual table based on the result-set of an SQL statement.
  2. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more actual tables in the database.
  3. You can add SQL functions, WHERE and JOIN statements to a view and present the data as if the data were coming from one single table.
  4. But if a view performs an operation on millions of records, performance of the view will decrease dramatically and if this operation is performed frequently then the view will access millions of records repeatedly. 
  5. To resolve this issue, materialized view comes into picture. 
  6. A materialized view is defined same as a regular view but the output is stored in a physical table which is updated frequently whenever the actual tables change. 
  7. They are useful to aggregate data in business intelligence applications with complex queries.

No comments:

Post a Comment