A materialized view provides indirect access to table data by storing the results of a query in a separate schema object. Unlike an ordinary view, which does not take up any storage space or contain any data, a materialized view contains the rows resulting from a query against one or more base tables or views. A materialized view can be stored in the same database as its base tables or in a different database.
Topics:
See Also: Oracle Database Concepts for information about materialized views |
To create a materialized view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Materialized View.
Define the materialized view:
Materialized View Name - Enter a name.
Query - Specify a query to define the view.
To access Query Builder or SQL Command Processor, click the appropriate link at the bottom of the page. The selected tool appears in a pop-up window. Once you generate the appropriate SQL, click Return to automatically close the popup window and return to the wizard with the SQL.
Click Next.
A confirmation page appears. To view the SQL used to create the materialized view, click SQL.
Click Create.
To view a materialized view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Materialized Views.
From the Object Selection pane, select a view.
The Materialized View appears.
Click the tabs at the top of the page to view different reports about the materialized view. Table 18-12 describes all available views.
Table 18-12 Available Views for Materialized View
View | Description |
---|---|
Materialized View |
(Default) Displays details about the columns in the materialized view, including:
Click Drop to delete the current materialized view. |
Data |
Displays a report of the data in the columns. Actions you can perform include:
|
Details |
Displays object details stored in |
Grants |
Displays a list of grants on the current view, including grantee, privilege, and grant options. Actions you can perform in this view include Grant and Revoke. |
Dependencies |
Displays a list of objects that use (or depend) upon this materialized view. |
SQL |
Displays the SQL necessary to re-create this materialized view. |