Expand description
A set of traits for modeling things that can be explained by a
SQL EXPLAIN statement.
The main trait in this module is Explain.
An explainable subject S implements Explain, and as part of that:
- Fixes the context type required for the explanation.
in
Explain::Context. - Fixes the explanation type for each
ExplainFormatinExplain::Text,Explain::Json, …. - Provides an explanation type constructor for each supported
ExplainFormatfrom references toS,ExplainConfig, and the currentExplain::ContextinExplain::explain_text,Explain::explain_json, ….
The same explanation type can be shared by more than one
ExplainFormat.
Use UnsupportedFormat and the default explain_$format
constructor for Explain to indicate that the implementation does
not support this $format.
Re-exports§
pub use crate::explain::tracing::trace_plan;
Modules§
- dot
- Structs and traits for
EXPLAIN AS DOT. - json
- Structs and traits for
EXPLAIN AS JSON. - text
- Structs and traits for
EXPLAIN AS TEXTandEXPLAIN AS VERBOSE TEXT. - tracing
- Tracing utilities for explainable plans.
Structs§
- Analyses
- A container for derived analyses.
- Annotated
Plan - A somewhat ad-hoc way to keep carry a plan with a set of analyses derived for each node in that plan.
- Compact
Scalar Seq - Pretty-prints a list of scalar expressions that may have runs of column indices as a comma-separated list interleaved with interval expressions.
- Compact
Scalars - Pretty-prints a list of scalar expressions that may have runs of column indices as a comma-separated list interleaved with interval expressions.
- Dummy
Humanizer - A bare-minimum implementation of
ExprHumanizer. - Explain
Config - A set of options for controlling the output of
Explainimplementations. - Expr
Humanizer Ext - An
ExprHumanizerthat extends theinnerinstance with shadow items that are reported as present, even though they might not exist ininner. - Humanized
Analyses - Indices
- Pretty-prints a list of indices.
- Plan
Rendering Context - Rendering
Context - A helper struct which will most commonly be used as the generic
rendering context type
Cfor variousExplain$Formatimplementations. - Transient
Item - A description of a catalog item that does not exist, but can be reported as
present in the catalog by a
ExprHumanizerExtinstance that has it in itsitemslist. - Used
Indexes - A set of indexes that are used in the explained plan.
Enums§
- Delta
Join Index Usage Type - In a snapshot, one arrangement of the first input is scanned, all the other arrangements (of the first input, and of all other inputs) only get lookups. When later input batches are arriving, all inputs are fully read.
- Explain
Error - The type of errors that may occur when an
Explain::explaincall goes wrong. - Explain
Format - Possible output formats for an explanation.
- Explainee
- The type of object to be explained
- Index
Usage Type - Unsupported
Format - A zero-variant enum to be used as the explanation type in the
Explainimplementation for all formats that are not supported forSelf.
Traits§
- Explain
- A trait that provides a unified interface for objects that can be explained.
- Expr
Humanizer - A trait for humanizing components of an expression.
- Scalar
Ops