From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Improvements in Copy From |
Date: | 2020-09-10 18:55:27 |
Message-ID: | CALAY4q_0msaVmW_1k5UOFO4Q4mLfueohE-7m51T2i1xWkVksjg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 10, 2020 at 1:17 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> >
> > We have a patch for column matching feature [1] that may need a header
> line to be further processed. Even without that I think it is preferable to
> process the header line for nothing than adding those checks to the loop,
> performance-wise.
>
> I had seen that patch, I feel that change to match the header if the
> header is specified can be addressed in this patch if that patch gets
> committed first or vice versa. We are doing a lot of processing for
> the data which we need not do anything. Shouldn't this be skipped if
> not required. Similar check is present in NextCopyFromRawFields also
> to skip header.
>
The existing check is unavoidable but we can live better without the checks
added by the patch. For very large files the loop may iterate millions of
times if it is not in billion and I am sure doing the check that many times
will incur noticeable performance degradation than further processing a
single line.
regards
Surafel
From | Date | Subject | |
---|---|---|---|
Next Message | Yaroslav | 2020-09-10 19:19:55 | Probable documentation errors or improvements |
Previous Message | Jonathan S. Katz | 2020-09-10 18:33:25 | Re: PG 13 release notes, first draft |