|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Heikki Linnakangas <hlinnaka(at)iki(dot)fi>|
|Cc:||Adam Lee <ali(at)pivotal(dot)io>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: Take skip header out of a loop in COPY FROM|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> On 22/08/2019 12:54, Adam Lee wrote:
>> My next thought is to call unlikely() here, but we don't have it...
> We do, actually, since commit aa3ca5e3dd in v10.
> Not sure it's worth the trouble here. Optimizing COPY in general would
> be good, even small speedups there are helpful because everyone uses
> COPY, but without some evidence I don't believe particular branch is
> even measurable.
I concur that there's no reason to think that this if-test has a
measurable performance cost. We're about to do CopyReadLine which
certainly has way more than one branch's worth of processing in it.
If we want to get involved with sprinkling unlikely() calls into
copy.c, the inner per-character or per-field loops would be the
place to look for wins IMO.
I'm going to mark this CF entry as Returned With Feedback.
regards, tom lane
|Next Message||Robert Haas||2019-09-24 18:09:32||Re: The flinfo->fn_extra question, from me this time.|
|Previous Message||Robert Haas||2019-09-24 17:53:03||Re: WIP/PoC for parallel backup|