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.
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.