PostgreSQL Maestro online Help
Materialized Vews
A materialized view is a view that has been computed and stored on disk. Materialized views have characteristics of both views (they are defined using a query specification), and of tables (they allow most table operations to be performed on them). The main differences between a materialized view and a table are that the materialized view cannot subsequently be directly updated and that the query used to create the materialized view is stored in exactly the same way that a view's query is stored, so that fresh data can be generated for the materialized view with the special command.
New materialized views are created within Create Materialized view Wizard. In order to run the wizard you should either
• | select the Object | Create Database Object... main menu item; |
• | select the Materialized view icon in the Create Database Object dialog |
or
• | select the Materialized view list or any object from that list in the explorer tree; |
• | select the Create New Materialized view... item from the popup menu |
or
• | open the schema in Schema Editor and the Materialized view tab there; |
• | press the Insert key or select the Create New Materialized view item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). |
To create a new materialized view with the same properties as one of the existing defaults has:
• | select the Object | Duplicate Database Object... main menu item; |
• | follow the instructions of Duplicate Object Wizard. |
|
Materialized views can be edited within Materialized view Editor. In order to run the editor you should either
• | select the materialized view for editing in the explorer tree (type the first letters of the materialized view name for quick search); |
• | select the Edit Materialized view ... item from the popup menu |
or
• | open the schema in Schema Editor and the Materialized view tab there; |
• | select the materialized view to edit; |
• | press the Enter key or select the Edit Materialized view item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). |
You can change the name of the materialized view using the Rename Materialized view dialog. To open the dialog you should either
• | select the materialized view to rename in the explorer tree; |
• | select the Rename Materialized view item from the popup menu |
or
• | open the schema in Schema Editor and the Materialized view tab there; |
• | select the materialized view to rename; |
• | select the Rename Materialized view item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). |
|
To drop a materialized view:
• | select the materialized view to drop in the explorer tree; |
• | select the Drop Materialized view item from the popup menu |
or
• | open the schema in Schema Editor and the Materialized view tab there; |
• | select the materialized view to drop; |
• | press the Delete key or select the Drop Materialized view item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar) |
and confirm dropping in the dialog window.
|