Apr 19, 2010

What is Materialized View?

If we need to do some complex calculations, some agregrated functions like group calculations, we used Materiazed View.
A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views. Collectively these objects are called master tables (a replication term) or detail tables (a data warehousing term). This reference uses "master tables" for consistency. The databases containing the master tables are called the master databases.


When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects.

Syantax :
CREATE MATERIALIZED VIEW schema.name

PCTFREE integer

PCTUSED integer

TABLESPACE tablespace_name

BUILD IMMEDIATE

REFRESH FAST | FORCE ON COMMIT / DEMAND

USING INDEX / USING NO INDEX

INITRANS integer

STORAGE CLAUSE

AS (SQL statement);

No comments:

OraApps Search

Custom Search

Search This Blog