Re: EXPLAIN statement can also apply to SELECT INTO. - Mailing list pgsql-general

From David G. Johnston
Subject Re: EXPLAIN statement can also apply to SELECT INTO.
Date
Msg-id CAKFQuwaUufXMGiT8EikcLVsveWyM=aQjumVNg9D65zDMMMey_w@mail.gmail.com
Whole thread Raw
In response to EXPLAIN statement can also apply to SELECT INTO.  (jian he <jian.universality@gmail.com>)
List pgsql-general
On Monday, August 21, 2023, jian he <jian.universality@gmail.com> wrote:
hi.

https://www.postgresql.org/docs/current/sql-explain.html
>>>
Any SELECT, INSERT, UPDATE, DELETE, MERGE, VALUES, EXECUTE, DECLARE,
CREATE TABLE AS, or CREATE MATERIALIZED VIEW AS statement, whose
execution plan you wish to see.
>>>

seems you can use it with SELECT INTO.

explain (ANALYZE, BUFFERS, TIMING, VERBOSE ON, BUFFERS ON, WAL ON,SETTINGS ON)
select count(*) as cnt INTO s from tenk1;


We try not to encourage such things.  And CTAS is listed.

David J.
 

pgsql-general by date:

Previous
From: jian he
Date:
Subject: EXPLAIN statement can also apply to SELECT INTO.
Next
From: Andreas Kretschmer
Date:
Subject: Re: Will PostgreSQL 16 supports native transparent data encryption ?