Dyre,
I apologize for the confussion. I wasn't quite sure what Daniel meant
with regards to:
> All in one transaction using executeUpdate():
> 100 tags added in 274ms
> 100 tags removed in 70ms
> 1000 tags added in 299ms
> 1000 tags removed in 250ms
> 10000 tags added in 1605ms
> 10000 tags removed in 1500ms
> 100000 tags added in 14441ms
> 100000 tags removed in 19721ms
In looking again at your proposed solution, this in fact may be what he
was doing.
> PreparedStatement ps =
> conn.prepareStatement("insert into T values (?, ?, ?)");
> conn.setAutoCommit(false);
> for (int i = 0; i < 1000; ++i) {
ps.setX(1, <whatever>);
ps.setX(2, <whatever>);
ps.setX(3, <whatever>);
ps.executeUpdate();
> }
> conn.commit();
With autoCommit off you are executing 1000 updates but only performing
'One' commit. If Daniel is equating transactions with commits then your
approach would be correct.
Thank you,
Derek