pub struct ExplainStatement {
pub analyze: bool,
pub inner: Box<Statement>,
pub suggest: bool,
pub costs_off: bool,
pub buffers: bool,
pub timing_off: bool,
pub settings: bool,
pub wal: bool,
pub summary_off: bool,
pub format: ExplainFormat,
}Expand description
Each bool mirrors one independent PG EXPLAIN (…) option (ANALYZE,
SUGGEST, COSTS OFF, BUFFERS, TIMING OFF, …); they compose freely, so a
bitflags word or a nested options struct would only relocate the lint
while making the option each caller sets harder to read.
Fields§
§analyze: bool§inner: Box<Statement>v7.39 (round 225) — widened from SelectStatement so EXPLAIN
INSERT/UPDATE/DELETE parses (PG explains DML); the engine renders
Insert on / Update on / Delete on trees for them.
suggest: boolv6.8.3 — EXPLAIN (SUGGEST) <SELECT> enables the index
advisor pass: after the regular plan tree, the engine
emits one suggestion line per column referenced in the
query’s WHERE / JOIN that has no covering index on the
owning table.
costs_off: boolv7.37.7 — EXPLAIN (COSTS OFF) <SELECT> strips wall-clock
elapsed=…us annotations from the Total line (and any
future cost-bearing lines). PG-standard option used by
regression suites and diff-friendly EXPLAIN output. When
true, takes precedence over the per-session
SPG_TEST_EXPLAIN_NO_COSTS GUC.
buffers: boolv7.37.22 (22.7) — EXPLAIN (BUFFERS) <SELECT>. PG-standard
option that surfaces hot/cold/shared block counters. SPG’s
hot-tier scan path counts examined rows; the BUFFERS option
makes that an explicit per-operator annotation.
timing_off: boolv7.37.22 (22.7) — EXPLAIN (TIMING [ON|OFF]) <SELECT>. PG
uses this to disable per-operator timing while still
emitting actual-row counts (cheaper than ANALYZE). Default
when EXPLAIN ANALYZE is set: TIMING ON. false strips the
timing portion of the Total line. Decoupled from costs_off:
PG’s COSTS OFF strips estimated cost; TIMING OFF strips
measured wall-clock.
settings: boolv7.37.22 (22.7) — EXPLAIN (SETTINGS) <SELECT>. PG appends
modified GUC values to the plan output. SPG emits the
session params that diverge from default after the main
plan body.
wal: boolv7.37.22 (22.7) — EXPLAIN (WAL) <SELECT>. PG counts WAL
bytes / records / FPI emitted by the query. SPG’s
write-side queries (INSERT/UPDATE/DELETE wrapped in EXPLAIN
ANALYZE) report against the engine WAL counter delta.
summary_off: boolv7.39 (round 227) — EXPLAIN (SUMMARY OFF) suppresses the trailing
Planning Time: / Execution Time: lines. PG defaults SUMMARY on
for ANALYZE and off otherwise; SPG emits them for ANALYZE unless
this is set.
format: ExplainFormatv7.37.23 (23.5) — EXPLAIN (FORMAT text|json|xml|yaml).
PG’s standard format selector. Default is text. JSON / XML
/ YAML emit a single-row TEXT result whose body wraps the
existing line-per-operator text in the chosen container —
PG-compatible just enough for dashboards that parse those
container shapes (pgAdmin’s JSON path picker, etc.).
Trait Implementations§
Source§impl Clone for ExplainStatement
impl Clone for ExplainStatement
Source§fn clone(&self) -> ExplainStatement
fn clone(&self) -> ExplainStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more