Re: Reading execution plan - first row time vs last row time

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Pecsök Ján <jan(dot)pecsok(at)profinit(dot)eu>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Reading execution plan - first row time vs last row time
Date: 2024-10-02 18:32:39
Message-ID: 2bd8e4fc-62d1-4160-905b-f691c99dcdc0@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)pecsok(at)profinit(dot)eu <mailto:jan(dot)pecsok(at)profinit(dot)eu> www.profinit.eu
>> <https://www.profinit.eu/>
>>
>> <https://www.profinit.eu/>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vinícius Abrahão 2024-10-03 11:29:50 Re: Userland copy of pg_statistic - is there a solution?
Previous Message Daniel Gustafsson 2024-10-02 18:23:40 Re: pg_dump 17 produces files incompatible with older server versions