Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Materialized views » Advanced: Status and properties for materialized views


Materialized view properties

Materialized view properties are used by the optimizer when evaluating whether to use a view. The following list describes the properties for a materialized view that are returned by the sa_materialized_view_info system procedure:

  • Status   Indicates whether the view is enabled or disabled.

  • DataStatus   Reflects the state of the data in the view. For example, it tells you whether the view is initialized and whether the view is stale. Manual views are stale if data in the underlying tables has changed since the last time the materialized view was refreshed. Immediate views are never stale.

  • ViewLastRefreshed   Indicates the last time the view was refreshed.

  • DateLastModified   Indicates the most recent time the data in any underlying table was modified if the view is stale.

  • AvailForOptimization   Reflects whether the view is available for use by the optimizer.

  • RefreshType   Indicates whether it is a manual view or an immediate view.

For the list of possible values for each property, use the sa_materialized_view_info system procedure.

While there is no property that tells you whether a manual view can be converted to an immediate view, you can determine this by using the sa_materialized_view_can_be_immediate system procedure.

 See also