Refreshing Materialized View Data

Refresh materialized view data to apply any modifications to underlying base tables to the view.

Prerequisites
Database Version Materialized View Privileges
SAP Sybase IQ 15.3 and 15.4 Requires DBA authority.

Also requires both of:

  • INSERT permission on the underlying tables of the materialized view or you own the materialized view.
  • SELECT permission on the underlying tables of the materialized view or you own the underlying tables of the materialized view.
SAP Sybase IQ 16.0 Requires one of:
  • INSERT ANY TABLE system privilege.
  • INSERT permission on the materialized view.
  • You own the materialized view.
Also requires one of:
  • SELECT ANY TABLE system privilege.
  • SELECT permission on the underlying tables of the materialized view.
  • You own the underlying tables of the materialized view.
Task
Materialized view data is read-only. Materialized views are only supported for system store (IQ catalog store) tables.
  1. In the Perspective Resources view, select the resource and select Resource > Administration Console.
  2. In the left pane, select IQ Servers > Schema Objects > Views > Materialized Views.
  3. Select one or more materialized views from the right pane and either:
    • Click the arrow to the right of the name and select Refresh Data, or
    • From the Administration Console menu bar, select Resource > Refresh Data.
    Tip: Use Shift-click or Control-click to select multiple materialized views.
  4. Verify that the list of materialized views to be refreshed is correct and click Yes.
  5. Select an isolation level.
    Level Description

    Read uncommitted

    (level 0)

    • Read permitted on row with or without write lock
    • No read locks are applied
    • No guarantee that concurrent transaction will not modify row or roll back changes to row
    • Corresponds to table hints NOLOCK and READUNCOMMITTED
    • Allow dirty reads, non-repeatable reads, and phantom rows

    Read committed

    (level 1)

    • Read only permitted on row with no write lock
    • Read lock acquired and held for read on current row only, but released when cursor moves off the row
    • No guarantee that data will not change during transaction
    • Corresponds to table hint READCOMMITTED
    • Prevent dirty reads
    • Allow non-repeatable reads and phantom rows

    Repeatable read

    (level 2)

    • Read only permitted on row with no write lock
    • Read lock acquired as each row in the result set is read, and held until transaction ends
    • corresponds to table hint REPEATABLEREAD
    • Prevent dirty reads and non-repeatable reads
    • Allow phantom rows

    Serializable

    (level 3)

    • Read only permitted on rows in result without write lock
    • Read locks acquired when cursor is opened and held until transaction ends
    • Corresponds to table hints HOLDLOCK and SERIALIZABLE
    • Prevent dirty reads, non-repeatable reads, and phantom rows
    Snapshot
    • No read locks are applied
    • Read permitted on any row
    • Database snapshot of committed data is taken when the first row is read or updated by the transaction

    Share mode

    (Default)

    • Obtains a shared table lock on the table, preventing other transactions from modifying the table but allowing them read access.
    • If a transaction puts a shared lock on a table, it can change data in the table provided no other transaction holds a lock of any kind on the row(s) being modified.
    Exclusive mode
    • Obtains an exclusive table lock on the table, preventing other transactions from accessing the table. No other transaction can execute queries, updates, or any other action against the table.
  6. Click OK.
Related concepts
Materialized View Permissions
Materialized View Indexes
Related tasks
Creating a Materialized View
Viewing Materialized View Data in the Execute SQL Window
Truncating Materialized View Data
Validating Materialized View Data
Setting a Clustered Index
Recompiling and Enabling a Materialized View
Disabling a Materialized View
Deleting a Materialized View
Generating Materialized View DDL Commands
Viewing or Modifying Materialized View Properties
Authenticating a Login Account for a Managed Resource
Related reference
Materialized View Privilege Summary