Re: Read only transactions - Commit or Rollback

Поиск
Список
Период
Сортировка
От Michael Riess
Тема Re: Read only transactions - Commit or Rollback
Дата
Msg-id do8s24$ie4$1@news.hub.org
обсуждение исходный текст
Ответ на Read only transactions - Commit or Rollback  (Markus Schaber <schabi@logix-tt.com>)
Список 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 по дате отправления:

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: Read only transactions - Commit or Rollback
Следующее
От: Andreas Seltenreich
Дата:
Сообщение: Re: Read only transactions - Commit or Rollback