doc-exports/docs/dli/sqlreference/dli_08_0138.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

3.4 KiB

Viewing the Execution Plan

Function

This statement returns the logical plan and physical execution plan for the SQL statement.

Syntax

1
EXPLAIN [EXTENDED | CODEGEN] statement;

Keywords

EXTENDED: After this keyword is specified, the logical and physical plans are outputted at the same time.

CODEGEN: After this keyword is specified, code generated by using the Codegen is also outputted.

Precautions

None

Example

To return the logical and physical plans of SELECT * FROM test, run the following statement:

1
EXPLAIN EXTENDED select * from test;