JDBC autocommit versus own commits performance

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: JDBC autocommit versus own commits performance
Date: 2001-03-13 00:18:21
Message-ID: 001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc

I'm using Postgresql 7.1beta4 with JDBC, and I was wondering if I should go to the trouble of modifying my connection pool to manage two pools, once with setAutoCommit(false) and the other with setAutoCommit(true).

As it is, I turne off auto commit since in my transaction processing, I need to control the commit/rollback.

But, there are also a lot of cases where I'm doing a simple query and I don't need transaction isolation, per se. Is the performance better if I use auto-commit than if I SELECT and do a commit() myself? And is there any benefit to doing a rollback on a select instead of a commit, since nothing changed?

Would there be a benefit with auto commit off if I had to do several different SELECTs, since I'd only have to do one commit at the end instead of the autocommits after each step?

Thanks,
David

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Lincoln Yeoh 2001-03-13 07:31:21 Re: Data type for storing images?
Previous Message Joel Burton 2001-03-12 23:29:04 Re: Postgresql and MSACCESS

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gunnar R|nning 2001-03-13 11:38:51 Re: JDBC autocommit versus own commits performance
Previous Message arkin 2001-03-12 22:19:39 Re: connection pooling in JDBC driver