Skip to content

Commit

Permalink
doc: update EXPLAIN PLAN docs
Browse files Browse the repository at this point in the history
Update the docs to add the newly supported syntax introduced in
some recently merged PRs (MaterializeInc#21708, MaterializeInc#21973, and MaterializeInc#22021).
  • Loading branch information
aalexandrov committed Oct 5, 2023
1 parent 6ff6c09 commit f1f8c03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/user/content/sql/explain-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ The following three objects can be explained.

Explained object | Description
------|-----
**select_stmt** | Display the plan for an ad hoc `SELECT` statement.
**INDEX index_name** | Display the plan for an existing index.
**MATERIALIZED VIEW view_name** | Display the plan for an existing materialized view.
**select_stmt** | Display the plan for an ad-hoc [`SELECT` statement](./select).
**create_index** | Display the plan for a [`CREATE INDEX` statement](./create-index).
**create_materialized_view** | Display the plan for a [`CREATE MATERIALIZED VIEW` statement](create-materialized-view).
**INDEX index_name** | Display `OPTIMIZED` or `PHYSICAL` plan for an existing index.
**MATERIALIZED VIEW view_name** | Display `OPTIMIZED` or `PHYSICAL` plan for an existing materialized view.

### Output format

Expand Down Expand Up @@ -72,6 +74,7 @@ Modifier | Description
**join_impls** | Render details about the implementation strategy of optimized MIR `Join` nodes.
**keys** | Annotate each subplan with its unique keys.
**types** | Annotate each subplan with its inferred type.
**humanized_exprs** | Render `EXPLAIN AS TEXT` output with human-readable column references in operator expressions. **Warning**: SQL-level aliasing is not considered when inferring column names, so the plan output might become ambiguous if you use this modifier.
**filter_pushdown** | **Private preview** For each source, include a `pushdown` field that explains which filters [can be pushed down](../../transform-data/patterns/temporal-filters/#temporal-filter-pushdown).

## Details
Expand Down
2 changes: 2 additions & 0 deletions doc/user/sql-grammar/sql-grammar.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ explain_plan ::=
'FOR'?
(
select_stmt |
create_index |
create_materialized_view |
'INDEX' index_name |
'MATERIALIZED VIEW' view_name
)
Expand Down

0 comments on commit f1f8c03

Please sign in to comment.