SYSMQTSTAT

The SYSMQTSTAT view contains one row for every materialized table Start of changepartitionEnd of change.

Use this view when you want to see information about a specified materialized query table or set of materialized query tables. The information is similar to that returned via Show Materialized Query Tables in System i® Navigator.

The following table describes the columns in the SYSMQTSTAT view:

Table 1. SYSMQTSTAT view
Column name System Column Name Data Type Description
MQT_SCHEMA MQTSCHEMA VARCHAR(128) Name of the SQL schema that contains the materialized query table.
MQT_NAME MQTNAME VARCHAR(128) Name of the materialized query table.
MQT_PARTITION MQTMEMBER VARCHAR(128) Partition or member name of the materialized query table.
MQT_OWNER MQTOWNER VARCHAR(128) Materialized query table owner.
MQT_TEXT LABEL VARGRAPHIC(50) CCSID 1200

Nullable

Text of the materialized query table. Contains null if text does not exist for the materialized query table.
ENABLED ENABLED VARCHAR(3) An indication of whether the materialized query table is enabled:
NO
The materialized query table is not enabled for use.
YES
The materialized query table is enabled for use by the database manager.
CREATE_TIMESTAMP CREATED TIMESTAMP The timestamp when the materialized query table was created.
REFRESH_TIME REFRESHDTS TIMESTAMP

Nullable

The timestamp when the materialized query table was last refreshed. Contains null if the materialized query table has never been refreshed.
LAST_QUERY_USE LASTQRYUSE TIMESTAMP

Nullable

The timestamp of the last time the materialized query table was used in a query since the last time the usage statistics were reset. If the materialized query table has never been used in a query since the last time the usage statistics were reset, contains null.
LAST_STATISTICS_USE LASTSTUSE TIMESTAMP

Nullable

The timestamp of the last time the materialized query table was used by the optimizer for statistics since the last time the usage statistics were reset. If the materialized query table has never been used for statistics since the last time the usage statistics were reset, contains null.
QUERY_USE_COUNT QRYUSECNT BIGINT The number of times the materialized query table was used in a query since the last time the usage statistics were reset. If the materialized query table has never been used in a query since the last time the usage statistics were reset, contains 0.
QUERY_STATISTICS_COUNT QRYSTCNT BIGINT The number of times the materialized query table was used by the optimizer for statistics since the last time the usage statistics were reset. If the materialized query table has never been used for statistics since the last time the usage statistics were reset, contains 0.
LAST_USED_TIMESTAMP LASTUSED TIMESTAMP

Nullable

The timestamp of the last time the materialized query table was used directly by an application for native record I/O or SQL operations. If the materialized query table has never been used, contains null.
DAYS_USED_COUNT DAYSUSED INTEGER The number of days the materialized query table was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If the materialized query table has never been used since the last time the usage statistics were reset, contains 0.
LAST_RESET_TIMESTAMP LASTRESET TIMESTAMP

Nullable

The timestamp of the last time the usage statistics were reset for the materialized query table. For more information see the Change Object Description (CHGOBJD) command. If the materialized query table's last used timestamp has never been reset, contains null.
NUMBER_ROWS CARD BIGINT Number of rows in the materialized query table.
MQT_SIZE SIZE BIGINT Size (in bytes) of the materialized query table.
LAST_CHANGE_TIMESTAMP LASTCHG TIMESTAMP

Nullable

The timestamp of the last time the materialized query table was changed. If the materialized query table has never been changed since the last time the usage statistics were reset, contains null.
MAINTENANCE MAINTAIN VARCHAR(6) Indicates the maintenance for the materialized query table:
SYSTEM
The materialized query table is system maintained.
USER
The materialized query table is user maintained.
INITIAL_DATA INITIAL VARCHAR(19) Indicates the initial data for the materialized query table:
INITIALLY DEFERRED
Data is not inserted into the materialized query table when it is created.
INITIALLY IMMEDIATE
Data is inserted into the materialized query table when it is created.
REFRESH REFRESH VARCHAR(9) Indicates when the data in the materialized query table can be refreshed:
DEFERRED
Data in the materialized query table can be refreshed at any time using the REFRESH TABLE statement.
IMMEDIATE
Data in the materialized query table is immediately refreshed.
ISOLATION ISOLATION VARCHAR(27) Indicates the isolation level used to refresh the materialized query table:
NO COMMIT
The isolation level is NO COMMIT.
UNCOMMITTED READ
The isolation level is UNCOMMITTED READ.
CURSOR STABILITY
The isolation level is CURSOR STABILITY.
CURSOR STABILITY KEEP LOCKS
The isolation level is CURSOR STABILITY KEEP LOCKS.
READ STABILITY
The isolation level is READ STABILITY.
REPEATABLE READ
The isolation level is REPEATABLE READ.
SORT_SEQUENCE SRTSEQ Start of changeVARCHAR(12)End of change Indicates whether the materialize query table uses a collating sequence:
BY HEX VALUE
The materialize query table does not use a collating table.
*LANGIDSHR
The materialize query table uses a shared weight sort sequence (SRTSEQ).
*LANGIDUNQ
The materialize query table uses a unique weight sort sequence (SRTSEQ).
Start of changeALTSEQEnd of change
The materialize query table uses an alternate collating sequence (ALTSEQ).
LANGUAGE_IDENTIFIER LANGID CHAR(3)

Nullable

The language ID of the materialize query table. Contains null if the sort sequence is hex.
Start of changeSORT_SEQUENCE_SCHEMAEnd of change Start of changeSRTSEQSCHEnd of change Start of changeCHAR(10)

Nullable

End of change
Start of changeThe sort sequence table system schema. Contains null if the sort sequence is hex.End of change
Start of changeSORT_SEQUENCE_NAMEEnd of change Start of changeSRTSEQNAMEEnd of change Start of changeCHAR(10)

Nullable

End of change
Start of changeThe sort sequence table name. Contains null if the sort sequence is hex.End of change
MQT_RESTORE_DEFERRED MQTRSTDFR VARCHAR(3) An indication of whether a restore of the MQT is pending the restore of one of its dependents:
NO
The restore of the MQT is not deferred pending the restore of one of its dependent tables.
YES
The restore of the MQT is deferred pending the restore of one of its dependent tables.
ROUNDING_MODE DECFLTRND VARCHAR(8)

Nullable

Indicates the DECFLOAT rounding mode of the materialized query table:
CEILING
ROUND_CEILING
DOWN
ROUND_DOWN
FLOOR
ROUND_FLOOR
HALFDOWN
ROUND_HALF_DOWN
HALFEVEN
ROUND_HALF_EVEN
HALFUP
ROUND_HALF_UP
UP
ROUND_UP

Contains the null value if the materialized query table does not have an expression that references a DECFLOAT column, function, or constant.

DECFLOAT_WARNING DECFLTWRN VARCHAR(3)

Nullable

Indicates whether DECFLOAT warnings are returned:
NO
DECFLOAT warnings are not returned.
YES
DECFLOAT warnings are returned.

Contains the null value if the materialized query table does not have an expression that references a DECFLOAT column, function, or constant.

MQT_DEFINITION MQTDEF VARGRAPHIC(5000) CCSID 1200 The query of the materialized query table. If the length of the query exceeds 5000, '...' is returned at the end of the column value.
SYSTEM_MQT_SCHEMA SYS_MQDNAM CHAR(10) System materialized query table schema name.
SYSTEM_MQT_NAME SYS_MQNAME CHAR(10) System materialized query table name.