Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idKB


ThemeData Manipulation
Type

Views

Available from


...

  1. Views can simplify a complex table structure
  2. Views are acceptable when you want to restrict users to a particular subset of data.
  3. You can add/remove or concatenate fields easily in a view without modifying your underlying schema.
  4. Views can model complex joins easily.

...

Tip
titleiShare Performance

Scenario: You have a Layer in iShare which is based on a View and the underlying Table from which the View was created has e.g. millions of records when the View only filters a much smaller subset.

Result: This would be extremely inefficient. It would mean that iShare could potentially take a long time to load the Layer based on this View.

Solution: In Studio, create a Workflow Job and then either a Stored Procedure Task using the at_wkf_executecmd Function (from v6.0.0 this is called wkf_executecmd under the -Workflow- Function filter) or a Spatial Data Transformation Task, to create a new Table containing the same data subset as the View. This Workflow Job could then be scheduled to run as often as required to keep the data current. Then change your Layer definition to use the Table instead of the View.

What is a Materialized View

Note

Not currently supported in iShare as iShare uses PostgreSQL 9.0 - will be supported in iShare V6.0.0 which uses PostgreSQL 11.

A materialized view is a database object that contains the results of a query. For example, it may be a local copy of data located remotely, or may be a subset of the rows and/or columns of a table or join result, or may be a summary using an aggregate functionIn PostgreSQL, version 9.3 and newer natively support materialized views but they are not auto-refreshed. They are populated only at time of creation (unless WITH NO DATA is used). It may be refreshed later manually using REFRESH MATERIALIZED VIEW. From version 9.4, the refresh may be concurrent with selects on the materialized view if CONCURRENTLY is used.