Re: COPY support in JDBC driver?

From: "Michael Nacos" <m(dot)nacos(at)gmail(dot)com>
To: mark_addleman(at)bigfoot(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: COPY support in JDBC driver?
Date: 2008-10-16 09:13:55
Message-ID: 407fa4640810160213i1fee8998if61736f98cfb4881@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Mark,

Batching statements in JDBC will probably get you up to 1000 operations/sec
(reading from disk, slow database) or 10000 operations/sec (reading from
memory and/or fast database). I have not yet used the JDBC COPY patch, but
it might be what you want, if you need higher speeds. I had always
associated the COPY command with properly formatted input files, but I have
read all the patch needs is an InputStream, so it might be exactly what you
need.

I am planning to package pgBee into a library, so that it may be used from
other java programs or become part of a workflow, but it's always going to
be file based. Then again, when you say 'immense amount of data' and
'periodically' you make me worry about JVM coping with your memory
requirements.

cheers,

Michael

On Thu, Oct 16, 2008 at 12:14 AM, <mark_addleman(at)bigfoot(dot)com> wrote:

>
> Hi, Michael -
>
> Thanks for the batch pointer. We are currently using batches with
> varying sizes but still aren't getting the performance we'd like.
>
> As for including the COPY facility in the JDBC driver versus doing
> bulk loads from a command line utility: Our online application
> receives an immense amount of data periodically and must store that
> data into Postgres before the next bulk arrives. It makes sense to
> process and store this data entirely within the confines of a JVM and
> within a transaction thus COPY support in the JDBC driver is very
> helpful for us.
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Achilleas Mantzios 2008-10-16 14:17:16 issues with SQL size st.execute(SQL) in 8.3.3
Previous Message mark_addleman 2008-10-15 23:14:07 Re: COPY support in JDBC driver?