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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Database Options » Introduction to database options » Alphabetical list of options

login_procedure option [database] Next Page

materialized_view_optimization option [database]

Controls how materialized views are used by the optimizer to answer queries efficiently.

Allowed values

Disabled, Fresh, Stale, N { Minute[s] | Hour[s] | Day[s] | Week[s] | Month[s] }




Can be set for an individual connection, for an individual user, or for the PUBLIC group. Takes effect immediately.


The materialized_view_optimization option lets you specify the circumstances under which the optimizer can use stale materialized views.

Data in a materialized view becomes stale when data in any of the base tables referenced by the materialized view is updated. You should consider the acceptable degree of data staleness when deciding the refresh frequency for the materialized view, as well as the time it takes to refresh the view, since the view is not available for querying during the refresh process. You should also consider whether it is acceptable for the database server to return results that may not reflect the current state of the database. You can choose from the following settings for this option:

When a query directly references a materialized view, the view is used regardless of staleness; the materialized_view_optimization option has no effect in this case.