跳到主要内容

EXPLAIN

Shows the execution plan of a SQL statement with statistics, such as the number of rows to read, and the number of storage partitions to scan.

Syntax

EXPLAIN <statement>

Examples

EXPLAIN select t.number from numbers(1) as t, numbers(1) as t1 where t.number = t1.number;

----
Project
├── columns: [number (#0)]
└── HashJoin
├── join type: INNER
├── build keys: [numbers.number (#1)]
├── probe keys: [numbers.number (#0)]
├── filters: []
├── TableScan(Build)
│ ├── table: default.system.numbers
│ ├── read rows: 1
│ ├── read bytes: 8
│ ├── partitions total: 1
│ ├── partitions scanned: 1
│ └── push downs: [filters: [], limit: NONE]
└── TableScan(Probe)
├── table: default.system.numbers
├── read rows: 1
├── read bytes: 8
├── partitions total: 1
├── partitions scanned: 1
└── push downs: [filters: [], limit: NONE]