performance issues - Mailing list pgsql-jdbc

From jguthrie@air.org
Subject performance issues
Date
Msg-id 20021205164456.400813CCE@guthrie.charm.net
Whole thread Raw
Responses Re: performance issues  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Bug in DatabaseMetaData.getColumns(...)?? Patch applied
Next
From: Dave Cramer
Date:
Subject: Re: performance issues