pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Riess <mlriess@gmx.de>
To: pgsql-performance@postgresql.org
Subject: Re: Read only transactions - Commit or Rollback
Date: Tue, 20 Dec 2005 13:05:30 +0100
Message-ID: <do8s24$ie4$1@news.hub.org> (raw)
In-Reply-To: <43A7DFB5.3030408@logix-tt.com>
References: <43A7DFB5.3030408@logix-tt.com>

Markus Schaber schrieb:
> Hello,
> 
> We have a database containing PostGIS MAP data, it is accessed mainly
> via JDBC. There are multiple simultaneous read-only connections taken
> from the JBoss connection pooling, and there usually are no active
> writers. We use connection.setReadOnly(true).
> 
> Now my question is what is best performance-wise, if it does make any
> difference at all:
> 
> Having autocommit on or off? (I presume "off")


If you are using large ResultSets, it is interesting to know that 
Statement.setFetchSize() does not do anything as long as you have 
autocommit on. So you might want to always disable autocommit and set a 
reasonable fetch size with large results, or otherwise have serious 
memory problems in Java/JDBC.



view thread (13+ messages)  latest in thread

Message-ID: <do8s24$ie4$1@news.hub.org>
Permalink:  ../do8s24$ie4$1@news.hub.org/
Also on:    postgresql.org/message-id/do8s24$ie4$1@news.hub.org

 · 

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-performance@postgresql.org
  Cc: mlriess@gmx.de
  Subject: Re: Read only transactions - Commit or Rollback
  In-Reply-To: <do8s24$ie4$1@news.hub.org>

* 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