X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 994E34758E6 for ; Thu, 13 Feb 2003 04:20:46 -0500 (EST) Received: from trill.maridan.net (unknown [217.6.52.210]) by postgresql.org (Postfix) with ESMTP id 3AB36474E5C for ; Thu, 13 Feb 2003 04:20:44 -0500 (EST) Received: from polonium.de ([212.121.156.162]) by trill.maridan.net (8.9.3/8.9.3) with ESMTP id KAA28610 for ; Thu, 13 Feb 2003 10:20:44 +0100 Message-ID: <3E4B63CC.5070201@polonium.de> Date: Thu, 13 Feb 2003 10:22:20 +0100 From: Rafal Kedziorski Organization: POLONIUM User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: JBoss CMP Performance Problems with PostgreSQL 7.2.3 References: <000201c2d33a$7aecd320$ac584618@ltd924607.ca> In-Reply-To: <000201c2d33a$7aecd320$ac584618@ltd924607.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/58 X-Sequence-Number: 1114 Darryl A. J. Staflund wrote: >Hi Everyone, > >I am developing a JBoss 3.0.x application using PostgreSQL 7.2.3 as a >back-end database and Solaris 2.8 (SPARC) as my deployment OS. In this >application, I am using an EJB technology called Container Managed >Persistence (CMP 2.0) to manage data persistence for me. Instead of >writing and submitting my own queries to the PostgreSQL database, JBoss is >doing this for me. > >Although this works well for the most part, the insertion of many records >within the context of a single transaction can take a very long time to >complete. Inserting 800 records, for instance, can take upward of a >minute to finish - even though the database is fully indexed and records >consist of no more than a string field and several foreign key integer >values. > >I think I've tracked the problem down to the way in which PostgreSQL >manages transactions. Although on the Java side of things I perform all >my insertions and updates within the context of a single transaction, >PostgreSQL seems to treat each individual query as a separate transaction >and this is slowing down performance immensely. Here is a sample of my >PostgreSQL logging output: > > [...] I think the problem isn't PostgreSQL. This is the JBoss-CMP. Take a look on EJB Benchmark from urbancode (http://www.urbancode.com/projects/ejbbenchmark/default.jsp). Best Regards, Rafal