Re: Fast COPY FROM based on batch insert

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, tanghy(dot)fnst(at)fujitsu(dot)com, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, houzj(dot)fnst(at)fujitsu(dot)com
Subject: Re: Fast COPY FROM based on batch insert
Date: 2022-10-28 10:53:17
Message-ID: ccf33ea3-65b4-72dd-6bfb-337fb448433e@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28/10/2022 16:12, Etsuro Fujita wrote:
> On Thu, Oct 13, 2022 at 6:58 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
>> I have committed the patch after tweaking comments a little bit further.
>
> I think there is another patch that improves performance of COPY FROM
> for foreign tables using COPY FROM STDIN, but if Andrey (or anyone
> else) want to work on it again, I think it would be better to create a
> new CF entry for it (and start a new thread for it). So I plan to
> close this in the November CF unless they think otherwise.
>
> Anyway, thanks for the patch, Andrey! Thanks for reviewing, Ian and Zhihong!
Thanks,

I studied performance of this code in comparison to bulk INSERTions.
This patch seems to improve speed of insertion by about 20%. Also, this
patch is very invasive. So, I don't have any plans to work on it now.

--
regards,
Andrey Lepikhov
Postgres Professional

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2022-10-28 12:04:37 Re: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE
Previous Message David Rowley 2022-10-28 10:17:10 Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant