Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Andrew Maclean: "I am really quite impressed with the software. You and your people are doing a wonderful job. I actually have spent a while researching PostgreSQL admin/code generators and yours seems to fit our needs nicely. Your interface is beautiful".
Iwan Kelaiah: "SQL Maestro products (Postgresql) have saved me a lot of time in designing, managing and generating reports and front-ends of Postgresql databases. Keep up the great work and thank you for such great products.".

More

Add your opinion

PostgreSQL Maestro online Help

Prev Return to chapter overview Next

Create Materialized Views Wizard

Create Materialized View Wizard guides you through the process of creating a new view. See How To Create Materialized View to learn how to run this wizard.

 

The basic principles of Create Object Wizards in PostgreSQL Maestro are explained in a separate topic. Below you will find a description of wizard steps that are unique for the current object.

 

Selecting fields

To specify fields to be used in the view, select a table or a view from the Based on drop-down menu and specify which fields will be used in the new view. Use Add All or Add Selected buttons to include field(s) into view definition. Use the Remove Selected or Remove All items to exclude field(s) from the view's field list. Click the Next button to proceed. If column names are not provided, they are taken from the output column names of the query.
 

Specifying options

Use this step to set Owner, Tablespace, and Comment for the new materialized view. If not specified, default values are consulted.

 

Is populated

This clause specifies whether or not the materialized view should be populated at creation time. If not, the materialized view will be flagged as unscannable and cannot be queried until the Refresh materialized view is used.

 

Specifying WHERE condition

 

 

Suppose we need to select orders from the sample table Orders made between 01.02.2010 and 10.02.2010. These criteria are applied to the OrderDate column. Press the button to add this condition. Alternatively, you can use the Filter button and select the Add Condition option from the drop-down menu.

 

 

 

 

Select the OrderDate column in the drop-down list of the available columns.                                                                                                                                                      

 

 

 

 

Set the proper operator. In our example it is BETWEEN.                                                                                                                                                                                  

 

 

 

 

Next, you need to specify the range values for the selected operator. The editor used in value boxes is determined by the editor type assigned to the corresponding column.

 

 

Now use the Apply button to see the filter result.

 

You can add additional conditions to the same root level to be combined by the AND operator.

 

 

Suppose we need to select orders made between 01.02.2010 and 10.02.2010 and payed via 'Visa' or 'American Express'. This is a complex filter condition combining two simple conditions with the OR operator. Conditions from the same root level are combined by the AND operator. To add a condition combined with the previous one with the OR (NOT AND, NOT OR) operator, use a new group of conditions.

 

 

The next screen represents the finished filter conditions for this example.

 

 

See also: Materialized View Editor



Prev Return to chapter overview Next