Skip to content

sql: surface EXPLAIN ANALYZE stats when a statement diagnostics bundle is requested #55331

@asubiotto

Description

@asubiotto

As a first step towards always returning EXPLAIN ANALYZE statistics, we should conditionally do so when statement diagnostics are requested through the admin UI.

Collection is already enabled when collecting statement diagnostics. What needs to be done here is save the latest EXPLAIN ANALYZE plan in stmtStats (aggregating multiple EXPLAIN ANALYZE plans is out of scope) and return whatever is needed through the admin UI. For a first pass, it might be interesting to write some code to aggregate memory usage for a statement on multiple nodes and return that in StatementStatistics. This last item of work is tracked in #54340.

Metadata

Metadata

Assignees

Labels

A-sql-observabilityRelated to observability of the SQL layerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions