Skip to main content
Version: Latest-3.3

SHOW ALTER MATERIALIZED VIEW

Description

Shows the building status of synchronous materialized views.

tip

This operation does not require privileges.

Syntax

SHOW ALTER MATERIALIZED VIEW [ { FROM | IN } db_name]

Parameters in brackets [] is optional.

Parameters

ParameterRequiredDescription
db_namenoThe name of the database to which the materialized view resides. If this parameter is not specified, the current database is used by default.

Returns

ReturnDescription
JobIdThe ID of refresh job.
TableNameThe name of the table.
CreateTimeThe time when refresh job is created.
FinishedTimeThe time when refresh job is finished.
BaseIndexNameThe name of the base table.
RollupIndexNameThe name of the materialized view.
RollupIdThe ID of the materialized view rollup.
TransactionIdThe ID of transaction that waits to be executed.
StateThe state of the job.
MsgError message.
ProgressProgress of the refresh job.
TimeoutTimeout for the refresh job.

Examples

Example 1: building status of synchronous materialized views

MySQL > SHOW ALTER MATERIALIZED VIEW\G
*************************** 1. row ***************************
JobId: 475991
TableName: lineorder
CreateTime: 2022-08-24 19:46:53
FinishedTime: 2022-08-24 19:47:15
BaseIndexName: lineorder
RollupIndexName: lo_mv_sync_1
RollupId: 475992
TransactionId: 33067
State: FINISHED
Msg:
Progress: NULL
Timeout: 86400
*************************** 2. row ***************************
JobId: 477337
TableName: lineorder
CreateTime: 2022-08-24 19:47:25
FinishedTime: 2022-08-24 19:47:45
BaseIndexName: lineorder
RollupIndexName: lo_mv_sync_2
RollupId: 477338
TransactionId: 33068
State: FINISHED
Msg:
Progress: NULL
Timeout: 86400
2 rows in set (0.00 sec)