X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8895B474E4F for ; Thu, 13 Feb 2003 18:19:04 -0500 (EST) Received: from ultra.echostar.com (che-ul.echostar.com [204.76.133.5]) by postgresql.org (Postfix) with ESMTP id B9319474E42 for ; Thu, 13 Feb 2003 18:19:03 -0500 (EST) Received: from localhost.localdomain ([10.70.20.88]) by ultra.echostar.com (8.9.3/8.9.3) with ESMTP id SAA09501; Thu, 13 Feb 2003 18:17:55 -0500 Content-Type: text/plain; charset="iso-8859-1" From: Nick Pavlica Reply-To: nick.pavlica@echostar.com Organization: EchoStar Communications To: pginfo , Rafal Kedziorski Subject: Re: JBoss CMP Performance Problems with PostgreSQL 7.2.3 Date: Thu, 13 Feb 2003 16:19:12 -0700 User-Agent: KMail/1.4.3 Cc: pgsql-performance@postgresql.org, darryl.staflund@shaw.ca References: <000201c2d33a$7aecd320$ac584618@ltd924607.ca> <3E4B63CC.5070201@polonium.de> <3E4B6CFA.725CA585@t1.unisoftbg.com> In-Reply-To: <3E4B6CFA.725CA585@t1.unisoftbg.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302131619.12416.nick.pavlica@echostar.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/62 X-Sequence-Number: 1118 You may want to look at this tool as well: http://hibernate.bluemars.net/1.html On Thursday 13 February 2003 3:01 am, pginfo wrote: > Rafal Kedziorski wrote: > > 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 lo= ng > > > time to complete. Inserting 800 records, for instance, can take upwa= rd > > > 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 a= ll > > >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 > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > I think the problem is not in the jboss. > I am using pg + jboss from a long time and if you know how to wirk with it > the combination is excelent. > The main problem in this case is CMP and also EntityBeans. > By CMP jboss will try to insert this 800 records separate. > In this case pg will be slow. > > I never got good results by using EB and CMP. > If you will to have working produkt use BMP. > regards, > ivan. > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html --=20 Nick Pavlica EchoStar Communications CAS-Engineering (307)633-5237