Viewing or Modifying Materialized View Properties

View or change materialized view properties including the SQL view definition (including the column definition), the amount of free space you want to reserve for each materialized view page, permissions on the materialized view, and the refresh type.

Prerequisites
Database Version Materialized View Privileges
SAP Sybase IQ 15.3 and 15.4

View any materialized view property page – none.

Modify materialized view permissions – You must have one of:
  • DBA authority
  • PERMS ADMIN authority
  • Administrative rights over the permission
  • You own the database object
Modify the SQL page of the materialized view properties – you must have one of:
  • DBA authority
  • You own the materialized view and have SELECT permission on the underlying tables
Modify any other materialized view property except those relating to indexes – you must have one of:
  • DBA authority
  • ALTER permission on the underlying tables
  • SELECT permission on the underlying tables
  • You own the materialized view
For privileges relating to materialized view indexes, see:
SAP Sybase IQ 16.0

View any materialized view property page – none.

Modify materialized view permissions – You must have one of:
  • MANAGE ANY OBJECT PRIVILEGE system privilege
  • You have administrative rights (with grant option) to the permission
  • You own the database object
Modify a materialized view comment – you must have one of:
  • CREATE ANY MATERIALIZED VIEW system privilege
  • ALTER ANY MATERIALIZED VIEW system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
  • You own the materialized view
Modify the SQL page of the materialized view properties – you must have one of:
  • DROP ANY MATERIALIZED VIEW system privilege
  • DROP ANY OBJECT system privilege
  • You own the materialized view
You must also have one of:
  • CREATE ANY MATERIALIZED VIEW system privilege
  • CREATE ANY OBJECT system privilege
Modify any other materialized view property except those relating to indexes – you must have one of:
  • ALTER ANY MATERIALIZED VIEW system privilege
  • ALTER ANY OBJECT system privilege
  • You own the materialized view
For privileges relating to materialized view indexes, see:
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, expand IQ Servers > Schema Objects > Views, and then select Materialized Views.
  3. Select a materialized view from the right pane and either:
    • Click the arrow to the right of the name and select Properties, or
    • From the Administration Console menu bar, select Resource > Properties.
    The Materialized View Properties view appears.
    Note:
    • When you are modifying properties, you need not click Apply before changing screens; however, doing so saves any changes.
    • If you do not have privileges to modify properties, SAP Control Center displays the properties view in read-only mode.
  4. View or modify the properties.
    • When you are modifying properties, you need not click Apply before changing screens; however, doing so saves any changes.
    • If you do not have privileges to modify properties, SAP Control Center displays the properties view in read-only mode.
    Area Description
    General

    Name – (Read-only) Name of the materialized view.

    Owner – (Read-only) Owner of the materialized view.

    Dbspace – (Read-only) Name of the dbspace the materialized view created on.

    Database – (Read-only) Name of the database the materialized view is created in.

    Status – Status of materialized view. Valid statuses are Enabled and Disabled.
    • Recompile and Enable – Select to recompile the materialized view.
    • Disable – Select to disable the materialized view.

    Optimized – Select to enable optimization.

    Initialized – Initialized status of materialized view. Valid statuses are Yes and No.
    • Refresh – Select to refresh the current materialized view.
    • Truncate – Select to truncate the materialized view.

    Refresh type – (Read-only) Refresh method defined for the materialized view.

    Immediate compatible – (Read-only) Immediate compatible status of materialized view.

    Last refresh time – (Read-only) Date and time last refresh performed

    Known stale time – (Read-only) Length of time between refreshes.

    Comment – A text field for adding an optional comment about the materialized view.

    SQL

    The SELECT statement used to create the materialized view.

    Columns

    (Read-only)

    Name – Column name.

    ID – Column ID.

    Data Type – Column Data type.

    Allows null – Indicates if the column accepts null values. Either Yes or No.

    Data
    Note:
    • For 15.3 and 15.4, requires SELECT permission on the underlying table to view data.
    • For 16.0, requires the SELECT ANY TABLE system privilege to view data.

    Displays the first 500 rows of data.

    Permissions See Materialized View Permissions.
    Referenced Objects

    (Read-only)

    Name – Table name.

    Owner – Table owner.

    Object Type – Referenced object type (Table, for example).

    Referenced Column – Column ID.

    Dependency Type – Indicates Direct or Indirect dependency.

    Dependent Views

    (Read-only)

    Name – View name.

    Owner – View owner.

    View Type – View type.

    Dependency Type – Indicates Direct or Indirect dependency.

    Indexes See Materialized View Indexes.
    Options

    (Read-only)

    date_format – Sets the format for dates retrieved from the database. The default is YYYY-MM-DD.

    date_order – Controls the interpretation of date formats. The default is YMD. For Open Client and jConnect connections, the default is set to MDY.

    default_timestamp_increment – Specifies the number of microseconds to add to a column of type TIMESTAMP to keep values in the column unique. The default is 1.

    first_day_of_week – Sets the numbering of the days of the week. The default is 7 (Sunday is the first day of the week).

    nearest_century – Controls the interpretation of two-digit years in string-to-date conversions. The default is 50.

    precision – Specifies the maximum number of digits in the result of any decimal arithmetic. The default is 30.

    scale – Specifies the minimum number of digits after the decimal point when an arithmetic result is truncated to the maximum precision. The default is 6.

    time_format – Sets the format for times retrieved from the database. The default is HH:NN:SS.SSS.

    timestamp_format – Sets the format for timestamps that are retrieved from the database. The default is YYYY-MM-DD HH:NN:SS.SSS.

    timestamp_with_timezone_format – Sets the format for timestamps that are retrieved from the database. The default is YYYY-MM-DD HH:NN:SS.SSS+HH:NN.

    uuid_has_hyphens – Controls the formatting of unique identifier values when they are converted to strings. Valid values are On (default) and Off.

    Miscellaneous

    Number of rows: (approximate) – Approximate number of rows in the view. To update this value, click Calculate.

    Calculate – Calculates the number of rows in the view.

    Default – Choose this option to reserve 200 bytes in each page.

    Percentage – Choose this option to specify an integer between 0 and 100. The former specifies that no free space is to be left on each page–each page is to be fully packed. A high value causes each row to be inserted into a page by itself.

    Materialized view data is encrypted – When the database is created with table encryption scope, you can select this option to encrypt this materialized view's data.

  5. Do one of:
    • Click OK to update any changes to the database and exit the properties view.
    • Click Apply to update any changes to the database, but remain in the properties view.
    • Click Cancel to cancel any changes not updated to the database and exit the properties view.
Related concepts
Materialized View Permissions
Materialized View Indexes
Related tasks
Creating a Materialized View
Viewing Materialized View Data in the Execute SQL Window
Refreshing Materialized View Data
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
Authenticating a Login Account for a Managed Resource
Related reference
Materialized View Privilege Summary