EXPLAIN query
EXPLAIN types
EXPLAIN AST
SYNTAX
PLAN indexes = 0,
header = 0,
description = 1,
actions = 0,
optimize = 1
json = 0
PIPELINE header = 0,
graph = 0,
compact = 1
ESTIMATE
SELECT ...
AST
- abstract syntax treeSYNTAX
- query text after AST-level optimizationsPLAN
- query execution planPIPELINE
- query execution pipelineESTIMATE
- See Estimates for select query, available since ClickHouse® 21.9indexes=1
supported starting from 21.6 (https://github.com/ClickHouse/ClickHouse/pull/22352 )json=1
supported starting from 21.6 (https://github.com/ClickHouse/ClickHouse/pull/23082)
References
- https://clickhouse.com/docs/en/sql-reference/statements/explain/
- Nikolai Kochetov from Yandeх. EXPLAIN query in ClickHouse. slides, video
- https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup39/query-profiling.pdf
- https://github.com/ClickHouse/ClickHouse/issues/28847