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

2019-04-23 Thread Souvik Bhattacherjee
Thanks, works fine! -Souvik On Mon, Apr 22, 2019 at 12:02 PM Tom Lane wrote: > Souvik Bhattacherjee 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

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

2019-04-22 Thread Tom Lane
Souvik Bhattacherjee 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 d

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

2019-04-22 Thread Thomas Kellerer
Souvik Bhattacherjee schrieb am 22.04.2019 um 17:27: 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. You can't

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

2019-04-22 Thread Thomas Kellerer
Souvik Bhattacherjee schrieb am 22.04.2019 um 17:27: 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. You can't

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

2019-04-22 Thread Bruce Momjian
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 que

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

2019-04-22 Thread Souvik Bhattacherjee
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. Thanks, -Souvik