X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 54FB49DC82D for ; Tue, 20 Dec 2005 08:05:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62245-03 for ; Tue, 20 Dec 2005 08:05:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 22AFC9DC81A for ; Tue, 20 Dec 2005 08:05:31 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id EFD3733A61; Tue, 20 Dec 2005 13:05:31 +0100 (MET) From: Michael Riess X-Newsgroups: pgsql.performance Subject: Re: Read only transactions - Commit or Rollback Date: Tue, 20 Dec 2005 13:05:30 +0100 Organization: Hub.Org Networking Services Lines: 19 Message-ID: References: <43A7DFB5.3030408@logix-tt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5 (Windows/20051025) In-Reply-To: <43A7DFB5.3030408@logix-tt.com> To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/484 X-Sequence-Number: 16305 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.