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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Is it possible to store the output of EXPLAIN into a table
Дата
Msg-id 20190422155908.tnlrajxuwmu6cg2s@momjian.us
обсуждение исходный текст
Ответ на Is it possible to store the output of EXPLAIN into a table  (Souvik Bhattacherjee <kivuosb@gmail.com>)
Список pgsql-general
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@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 +



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Resetting identity columns
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Is it possible to store the output of EXPLAIN into a table