-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: surface EXPLAIN ANALYZE stats when a statement diagnostics bundle is requested #55331
Copy link
Copy link
Closed
Labels
A-sql-observabilityRelated to observability of the SQL layerRelated to observability of the SQL layerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-observabilityRelated to observability of the SQL layerRelated to observability of the SQL layerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)