On Mon, Apr 22, 2019 at 11:27:18AM -0400, Souvik Bhattacherjee wrote:
> Hi,
> 
> I was just wondering if it is possible to store the output of EXPLAIN into a
> table.
> 
> 
> create temp table mytab as (select * from (explain select * from table1 where
> attr = 5) t);
> 
> 
> Unfortunately, the query above does not work.

I had to do this one and put the EXPLAIN in a function and then called
the function and captured the output, see this and following slides:

        http://momjian.us/main/writings/pgsql/optimizer.pdf#page=11

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Reply via email to