On Thu, 2024-01-25 at 12:18 -0500, Ron Johnson wrote: > PG 14.10 (and 9.6.24, which we're migrating off of). > > EXPLAIN SELECT works inside a FOR loop, but only the first line of the EXPLAIN > output is stored. What's the magic sauce for seeing the whole EXPLAIN output? DECLARE _v_explain jsonb; BEGIN EXECUTE 'EXPLAIN (FORMAT JSON) select ...' INTO _v_explain; RAISE NOTICE '%', _v_explain; END; Yours, Laurenz Albe