Re: COPY FROM performance improvements

From: "Alon Goldshuv" <agoldshuv(at)greenplum(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, llonergan(at)greenplum(dot)com, pgsql-patches(at)postgresql(dot)org
Subject: Re: COPY FROM performance improvements
Date: 2005-06-26 01:31:08
Message-ID: BEE3536C.6185%agoldshuv@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hmm, now that I look back at them I can't remember why I thought it is
slower. Certainly using appendStringInfoCharMacro for every char is very
slow, but I could probably use appendStringInfoString and it should be as
fast as using the bytebuffer, they both do a straight forward memcpy.

Alon.

On 6/25/05 4:27 PM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Alon Goldshuv" <agoldshuv(at)greenplum(dot)com> writes:
>> A struct "bytebuffer" is used instead of a StringInfoData for storing the
>> line and attributes. A StringInfoData is actually really cool and useful,
>> but we don't really need it's formatting capabilities in COPY FROM (as far
>> as I know), and so the bytebuffer is more straightfoward and faster.
>
> Is it really faster than appendStringInfoString or
> appendBinaryStringInfo?
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Luke Lonergan 2005-06-26 02:52:20 Re: COPY FROM performance improvements
Previous Message Petr Jelínek 2005-06-26 01:27:17 Re: limiting connections per user/database