pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Wall <d.wall@computer.org>
To: pgsql-interfaces@postgresql.org
Subject: JDBC autocommit versus own commits performance
Date: Mon, 12 Mar 2001 16:18:21 -0800
Message-ID: <001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com>
Permalink:  ../001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com/
Also on:    postgresql.org/message-id/001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: d.wall@computer.org
  Subject: Re: JDBC autocommit versus own commits performance
  In-Reply-To: <001e01c0ab53$1c6e4d80$5a2b7ad8@expertrade.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox