Re: Read only transactions - Commit or Rollback - Mailing list pgsql-performance

From Michael Riess
Subject Re: Read only transactions - Commit or Rollback
Date
Msg-id do8s24$ie4$1@news.hub.org
Whole thread Raw
In response to Read only transactions - Commit or Rollback  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: Markus Schaber
Date:
Subject: Re: Read only transactions - Commit or Rollback
Next
From: Andreas Seltenreich
Date:
Subject: Re: Read only transactions - Commit or Rollback