Re: Inserting a large number of records

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Steve Wampler <swampler(at)noao(dot)edu>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting a large number of records
Date: 2005-07-14 17:20:08
Message-ID: B925E39D-6866-4684-9724-D016DBA19287@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

It will never be as fast as COPY

Dave
On 14-Jul-05, at 11:41 AM, Steve Wampler wrote:

> Oliver Jowett wrote:
>
>> Greg Alton wrote:
>>
>>
>>> What is the most efficient way to insert a large number of
>>> records into
>>> a table?
>>>
>>
>>
>> I use a PreparedStatement INSERT and addBatch() / executeBatch() with
>> autocommit off and no constraints or indexes present.
>>
>
> Does anyone have an idea as to how the performance of this would
> compare
> to using a COPY? I've used the COPY patches with jdbc and 7.4.x with
> impressive results, but if the above is 'nearly' as good then I
> don't have
> to put off upgrading to 8.x while waiting on jdbc to officially
> include
> support for COPY. (I can't test the above right now. Maybe soon,
> though.)
>
> Thanks!
> Steve
> --
> Steve Wampler -- swampler(at)noao(dot)edu
> The gods that smiled on your birth are now laughing out loud.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that
> your
> message can get through to the mailing list cleanly
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Cryder 2005-07-14 17:40:53 Timezone conversion woes
Previous Message Csaba Nagy 2005-07-14 16:36:08 Re: Using a 7_4 JDBC driver to connect to 8.0