PREVIEW SQL

Description

The PREVIEW SQL syntax is used to preview SQL execution plan.

Syntax

Grammar Railroad diagram

  1. PreviewSql ::=
  2. 'PREVIEW' sqlStatement

Return Value Description

ColumnDescription
data_source_namestorage unit name
actual_sqlactual excute SQL statement

Example

  • Preview SQL execution plan
  1. PREVIEW SELECT * FROM t_order;
  1. mysql> PREVIEW SELECT * FROM t_order;
  2. +------------------+-----------------------+
  3. | data_source_name | actual_sql |
  4. +------------------+-----------------------+
  5. | su_1 | SELECT * FROM t_order |
  6. +------------------+-----------------------+
  7. 1 row in set (0.18 sec)

Reserved word

PREVIEW