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 - SQL Usage » Working with Database Objects » Working with views » Working with materialized views

Working with materialized views Next Page

Restrictions when managing materialized views

The following restrictions apply when creating, initializing and refreshing materialized views, and during view matching, as noted below:

Specifying an ORDER BY clause in a materialized view definition

Materialized views are similar to base tables in that the rows are not stored in any particular order; the database server orders the rows in the most efficient manner when computing the data. Therefore, specifying an ORDER BY clause in a materialized view definition has no guaranteed impact on the ordering of rows when the view is materialized. Also, the ORDER BY clause in the view's definition is ignored by the optimizer when performing view matching.

This is different behavior than non-materialized views for which the ORDER BY clause orders the results returned.

For information on materialized views and view matching by the optimizer, see Improving performance with materialized views.