Automate getting the output of EXPLAIN ANALYZE for a database query
Developers need to have an easy way of getting the output of EXPLAIN (ANALYZE, BUFFERS) (preferable with IO timings) for a given SQL, from either production or staging (default). To prevent accidents from happening the query would have to be executed in a read-only transaction.
@zj made a lot of progress towards this in gitlab-cog/postgres@faf16c1f so we can probably re-use a lot from that.
This feature should preferably be available from Slack one way or another. Using Marvin would probably be the easiest since we can just slightly adjust @zj's code to use EXPLAIN ANALYZE instead of regular EXPLAIN.