Re: performance issues

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: jguthrie(at)air(dot)org
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: performance issues
Date: 2002-12-05 16:54:40
Message-ID: 1039107280.2213.166.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Someone implemented the copy function in jdbc, grep through the archives
to find the details.

And definately drop the index, do the inserts, and rebuild the index.

Dave
On Thu, 2002-12-05 at 11:44, jguthrie(at)air(dot)org wrote:
> i (and co-workers) am trying to get the best performance out of jdbc
> inserting into a specific table (the rest of my app can suffer if it
> improves performance here). a couple of issues i have come across
> though, where i would welcome advice:
>
> 1) batches - we are thinking that we can save time by batching up,
> say, 10 inserts and using Statement.executeBatch(). the problem here
> is that executeBatch wants a nice sql statement String, whereas we are
> currently using PreparedStatements. and we are using
> PreparedStatements because we are inserting binary data (using
> setByteArray() to load a pg bytea field). so is there a way to:
> - use PreparedStatements in a batch environment?
> - insert binary data in a String format?
>
> 2) indexes - the table has a primary key, so it has an index. one
> bright idea i got was to drop the primary key, thus saving time by
> not doing all the index work. surprisingly, this seems to have no
> effect at all. does this make sense?
>
> thanks. again, all ideas welcome.
> john guthrie
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Dave Cramer <Dave(at)micro-automation(dot)net>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Justin Clift 2002-12-05 22:24:55 [Fwd: Re: [GENERAL] DbVisualizer and PG 7.3?]
Previous Message jguthrie 2002-12-05 16:44:56 performance issues