On Thu, 11 Nov 2004 11:04:18 +0100, Steinar H. Gunderson
<[EMAIL PROTECTED]> wrote:
> You don't even need a "BEGIN" and "END"; his code has a setAutoComit(true)
> before the for loop, which just has to be changed to setAutoCommit(false)
> (and add an explicit commit() after the for loop, of course)
On Thu, Nov 11, 2004 at 04:04:06PM +0800, Edwin Eyan Moragas wrote:
> how about using PreparedStatment? that's on the java end.
> on the pg end, maybe do a BEGIN before the for loop and
> END at the end of the for loop.
You don't even need a "BEGIN" and "END"; his code has a setAutoComit(true)
be
On Wed, 10 Nov 2004 14:51:57 +0100, Michael Kleiser <[EMAIL PROTECTED]> wrote:
>Statement st = con.createStatement();
>java.sql.Timestamp datum = new java.sql.Timestamp(new
> Date().getTime());
>Date start = new Date();
>System.out.p
: Shane|SkinnyCorp; [EMAIL PROTECTED]
Subject: [PERFORM] How to speed-up inserts with jdbc
[...]
> Statement st = con.createStatement();
[...]
st.executeUpdate("insert into
history(uuid,coni,date,direction,partner,type)
values('uuid','co
couple of things
1) That is a fairly old version of postgres, there are considerable
performance improvements in the last 2 releases since, and even more in
the pending release.
2) If you are going to insert more rows than that, consider dropping the
index before, and recreating after the insert
On Nov 10, 2004, at 8:51 AM, Michael Kleiser wrote:
It is trunning in in 10 Threads. Each thread makes 100 Inserts:
For the 1000 Inserts (10 threads a 100 inserts)
we need 8 seconds.
That's 125 Insets / Seconds.
How could we make it faster ?
Batch the inserts up into a transaction.
So you'd have
BE
Im PostgreSQL 7.2.2 / Linux 2.4.27 dual-processor Pentium III 900MHz,
we have this table:
create table testtable (id SERIAL PRIMARY KEY, coni VARCHAR(255), date
TIMESTAMP, direction VARCHAR(255), partner VARCHAR(255), type VARCHAR(255),
block VARCHAR(255) );
We using Java with JDBC-driver pg72jd