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

Поиск
Список
Период
Сортировка
От Souvik Bhattacherjee
Тема Re: Is it possible to store the output of EXPLAIN into a table
Дата
Msg-id CAANrPSfo5EgVpfe02eJRSXtpxUO-rMQkHNja-jFMn+52ac0RwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is it possible to store the output of EXPLAIN into a table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thanks, works fine!

-Souvik

On Mon, Apr 22, 2019 at 12:02 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Souvik Bhattacherjee <kivuosb@gmail.com> writes:
> I was just wondering if it is possible to store the output of EXPLAIN into
> a table.

EXPLAIN won't do that directly, but you could make a plpgsql function
along the lines of

      for t in execute explain ...
         return next t;

(too lazy to check the exact details here, but I believe you can find
related examples in our regression tests) and then store the function's
result into a table.

                        regards, tom lane

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

Предыдущее
От: Lewis Shobbrook
Дата:
Сообщение: Re: pgdg packages removed for 9.3
Следующее
От: Michel Pelletier
Дата:
Сообщение: Re: Quick hack for fetching the contents of a temp table