RE: multiple transactions

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Rini Dutta'" <rinid(at)rocketmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: RE: multiple transactions
Date: 2000-08-21 06:34:42
Message-ID: 1B3D5E532D18D311861A00600865478CF1B287@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There's several problems here.

1. JDBC doesn't support more than one transaction per connection - the
methods for controlling them are in Connection.

2. PostgreSQL doesn't (yet) support nested transactions (unless someones
done that without me noticing). This is a problem with some of the metadata
methods, as they issue queries, and if they fail then the user's transaction
gets rolled back without any apparent warning.

3. The proper way of speeding up things like inserts (where the SQL is
virtually identical) is to use PreparedStatement. However we currently
emulate this behavour in Java so when we can prepare statements in the
backend, there will be a huge performance boost here.

4. There may be some SQL problem that may be slowing things down. Double
check that nothing simple is hampering things...

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council

-----Original Message-----
From: Rini Dutta [mailto:rinid(at)rocketmail(dot)com]
Sent: Friday, August 18, 2000 9:56 PM
To: pgsql-hackers(at)postgresql(dot)org
Subject: [HACKERS] multiple transactions

Hi,

I'm using the postgresql 7.0.2., the JDBC interface. I
need to optimise the database storage speeds in my
application. In order to do this I considered having
more than one connection so that I can have separate
transactions for performing a group of inserts into a
specific table - 1 transaction/connection for one
table. But this seems to take the same time or even a
little longer than having the transactions occur
sequentially, contrary to my expectation especially
considering that these are inserts into separate
tables.
Could you shed some light on this, and what I need to
do to make inserts using JDBC faster ?

Thanks,
Rini

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2000-08-21 07:55:50 RE: SSL Patch - again :-)
Previous Message Thomas Lockhart 2000-08-21 05:51:11 Re: BIT/BIT VARYING status