Re: Reading execution plan - first row time vs last row time - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Reading execution plan - first row time vs last row time
Date
Msg-id 2bd8e4fc-62d1-4160-905b-f691c99dcdc0@aklaver.com
Whole thread Raw
In response to RE: Reading execution plan - first row time vs last row time  (Pecsök Ján <jan.pecsok@profinit.eu>)
List pgsql-general
On 10/2/24 02:37, Pecsök Ján wrote:
> Ok, I replaced names of tables and columns and here is the query
> 
> explain (analyze, verbose, settings, format text) create table dm.v_Table6_T_111111111  with (fillfactor = 100,
parallel_workers= 20, autovacuum_enabled = false, toast.autovacuum_enabled = false) as select
 
>        VHS.df_v_Table2_key
>      , df_Table3_key
>      , df_Table4
>      , null::varchar as ID3Table5
>      , EH.IDTable5
>      , EH.ID2Table5
> from dm.v_Table1_KT as VHS
> left outer join dm.v_Table5 as EH using (df_v_Table5_key, df_Table3_key, df_Table4)
> where VHS.df_Table4 = any ('{T}')
>      and VHS.df_Table4 = 'T' and VHS.df_Table3_key = 111111111;

I'm thinking it would be better to do something like:

create table dm.v_Table6_T_111111111 as select ... with no data

to create the table structure.

Then use COPY or batch INSERT to move the data into the table.


>>
>> S pozdravem
>>
>> *Ján Pecsők*
>>
>> Tychonova 2, 160 00 Praha
>> Mobil: +420 775 942 871
>> jan.pecsok@profinit.eu <mailto:jan.pecsok@profinit.eu> www.profinit.eu
>> <https://www.profinit.eu/>
>>
>> <https://www.profinit.eu/>
>>
> 
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: pg_dump 17 produces files incompatible with older server versions
Next
From: Vinícius Abrahão
Date:
Subject: Re: Userland copy of pg_statistic - is there a solution?