pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron Johnson <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re:
Date: Fri, 26 Jan 2024 09:23:54 +0100
Message-ID: <15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at> (raw)
In-Reply-To: <CANzqJaAf+h+Fn=-4n__-MxWcZ6Vp-KYe6UvqL930wBSXCkn21g@mail.gmail.com>
References: <CANzqJaAf+h+Fn=-4n__-MxWcZ6Vp-KYe6UvqL930wBSXCkn21g@mail.gmail.com>

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





view thread (4+ messages)

Message-ID: <15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at>
Permalink:  ../15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at/
Also on:    postgresql.org/message-id/15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, ronljohnsonjr@gmail.com
  Subject: Re: 
  In-Reply-To: <15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at>
  References: <CANzqJaAf+h+Fn=-4n__-MxWcZ6Vp-KYe6UvqL930wBSXCkn21g@mail.gmail.com> <15be52da1fd694e224b803743b43046f489bfaab.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox