EXPLAIN
EXPLAIN
用于提供语句的执行计划。
Syntax
EXPLAIN [ANALYZE] SELECT ...
ANALYZE
子句将执行语句并测量每个计划节点花费的时间以及输出的总行数等。
示例
EXPLAIN SELECT * FROM monitor where host='host1';
| plan_type | plan
| logical_plan | Projection: monitor.host, monitor.ts, monitor.cpu, monitor.memory
Filter: monitor.host = Utf8("host1")
TableScan: monitor projection=[host, ts, cpu, memory], partial_filters=[monitor.host = Utf8("host1")] |
| physical_plan | ProjectionExec: expr=[host@0 as host, ts@1 as ts, cpu@2 as cpu, memory@3 as memory]
CoalesceBatchesExec: target_batch_size=4096
FilterExec: host@0 = host1
RepartitionExec: partitioning=RoundRobinBatch(10)
ExecutionPlan(PlaceHolder)