Search Postgresql Archives

Re: Is it possible to store the output of EXPLAIN into a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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  <bruce@xxxxxxxxxx>        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 +





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux