Re: CopyReadAttributesCSV optimization - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: CopyReadAttributesCSV optimization
Date
Msg-id 47D1DACB.8020108@dunslane.net
Whole thread Raw
In response to CopyReadAttributesCSV optimization  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: CopyReadAttributesCSV optimization  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-patches

Heikki Linnakangas wrote:
> Here's a patch to speed up CopyReadAttributesCSV. On the test case
> I've been playing with, loading the TPC-H partsupp table, about 20%
> CopyReadAttributesCSV (inlined into DoCopy, DoCopy itself is
> insignificant):
>
>
[snip]
>
> The trick is to split the loop in CopyReadAttributesCSV into two
> parts, inside quotes, and outside quotes, saving some instructions in
> both parts.
>
> Your mileage may vary, but I'm quite happy with this. I haven't tested
> it much yet, but I wouldn't expect it to be a loss in any interesting
> scenario. The code also doesn't look much worse after the patch,
> perhaps even better.
>
>

This looks sane enough, and worked for me in testing, so I'm going to
apply it shortly. I'll probably add a comment or two about how the loops
interact.

cheers

andrew

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposed patch to change TOAST compression strategy
Next
From: Tom Lane
Date:
Subject: Re: Remove FATAL from pg_lzdecompress