SHOW-STATUS

Name

SHOW STATUS

Description

<<<<<<< HEAD This command is used to view the execution of the Create Materialized View job submitted through the CREATE-MATERIALIZED-VIEW statement.

This statement is equivalent to SHOW ALTER TABLE ROLLUP;

  1. SHOW ALTER TABLE MATERIALIZED VIEW
  2. [FROM database]
  3. [WHERE]
  4. [ORDER BY]
  5. [LIMIT OFFSET]
  • database: View jobs under the specified database. If not specified, the current database is used.
  • WHERE: You can filter the result column, currently only the following columns are supported:
    • TableName: Only equal value filtering is supported.
    • State: Only supports equivalent filtering.
    • Createtime/FinishTime: Support =, >=, <=, >, <, !=
  • ORDER BY: The result set can be sorted by any column.
  • LIMIT: Use ORDER BY to perform page-turning query.

Return result description:

  1. mysql> show alter table materialized view\G
  2. **************************** 1. row ******************** ******
  3. JobId: 11001
  4. TableName: tbl1
  5. CreateTime: 2020-12-23 10:41:00
  6. FinishTime: NULL
  7. BaseIndexName: tbl1
  8. RollupIndexName: r1
  9. RollupId: 11002
  10. TransactionId: 5070
  11. State: WAITING_TXN
  12. Msg:
  13. Progress: NULL
  14. Timeout: 86400
  15. 1 row in set (0.00 sec)
  • JobId: Job unique ID.

  • TableName: base table name

  • CreateTime/FinishTime: Job creation time and end time.

  • BaseIndexName/RollupIndexName: Base table name and materialized view name.

  • RollupId: The unique ID of the materialized view.

  • TransactionId: See the description of the State field.

  • State: job status.

    • PENDING: The job is in preparation.

    • WAITING_TXN:

      Before officially starting to generate materialized view data, it will wait for the current running import transaction on this table to complete. And the TransactionId field is the current waiting transaction ID. When all previous imports for this ID are complete, the job will actually start.

    • RUNNING: The job is running.

    • FINISHED: The job ran successfully.

    • CANCELLED: The job failed to run.

  • Msg: error message

  • Progress: job progress. The progress here means completed tablets/total tablets. Materialized views are created at tablet granularity.

  • Timeout: Job timeout, in seconds.

\=======

1c59e4cf7 (fix docs 404 url)

Example

Keywords

  1. SHOW, STATUS

Best Practice