Determining which materialized views were considered by the optimizer

In Interactive SQL you can determine which materialized view the optimizer used to satisfy a query.

Prerequisites

None.

Context and remarks

Note

When snapshot isolation is in use, the optimizer does not consider materialized views that were refreshed after the start of the snapshot for the current transaction.

 Determine which materialized views were considered by the optimizer
  1. Start Interactive SQL and connect to the SQL Anywhere database.

  2. Click Tools » Plan Viewer (or press Shift+F5).

  3. Type the query in the SQL pane.

  4. Select a Statistics level, a Cursor type and an Update status.

  5. Click Get Plan.

  6. Look on the Details and Advanced Details panes to see which materialized views, if any, were used to satisfy the query.

Results

The materialized views that were used to satisfy the query are displayed.

Next

None.

 See also