Skip site navigation (1) Skip section navigation (2)

Re: Read only transactions - Commit or Rollback

From: Grega Bremec <gregab(at)p0f(dot)net>
To: PostgreSQL Performance List <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Read only transactions - Commit or Rollback
Date: 2005-12-20 11:41:09
Message-ID: (view raw or whole thread)
Lists: pgsql-performance
Hash: RIPEMD160

Nörder-Tuitje wrote:
|> 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")
|> Using commit or rollback?
|> Committing / rolling back occasionally (e. G. when returning the
|> connection to the pool) or not at all (until the pool closes the
|> connection)?
| afaik, this should be completely neglectable.
| starting a transaction implies write access. if there is none, You do
| not need to think about transactions, because there are none.
| postgres needs to schedule the writing transactions with the reading
| ones, anyway.
| But I am not that performance profession anyway ;-)

Hello, Marcus, Nörder, list.

What about isolation? For several dependent calculations, MVCC doesn't
happen a bit with autocommit turned on, right?

- --
~    Grega Bremec
~    gregab at p0f dot net
Version: GnuPG v1.4.0 (GNU/Linux)


In response to

pgsql-performance by date

Next:From: Nörder-TuitjeDate: 2005-12-20 11:54:06
Subject: Re: Read only transactions - Commit or Rollback
Previous:From: William LaiDate: 2005-12-20 11:36:42
Subject: unsubscribe

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group