Re: Fastest method to insert data.

From: Barry Lind <barry(at)xythos(dot)com>
To: Sam Varshavchik <mrsam(at)courier-mta(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Fastest method to insert data.
Date: 2002-04-19 19:49:38
Message-ID: 3CC074D2.2020301@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

COPY will always be your best option if speed is the most important factor.

--Barry

Sam Varshavchik wrote:
>
> What would be the fastest way to insert a bunch of data (in 7.1)?
> Currently, a bunch of addBatch()es followed by executeBatch() is pretty
> fast, but not as fast as COPY TABLE via psql. I suppose I can use a
> single executeBatch() to insert the entire table, but AFAIK addBatch()
> just buffers the SQL in memory, and I prefer to have some kind of an
> upper limit on my memory footprint.
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sam Varshavchik 2002-04-19 23:36:09 Re: Fastest method to insert data.
Previous Message Alexander Troppmann 2002-04-19 19:39:22 Troubles using PreparedStatements