X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 14A7130FC2B for ; Wed, 25 Jun 2003 11:52:37 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 33972-02 for ; Wed, 25 Jun 2003 08:52:26 -0300 (ADT) Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181]) by svr1.postgresql.org (Postfix) with ESMTP id 8A39D30FBFB for ; Wed, 25 Jun 2003 08:52:25 -0300 (ADT) Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102]) by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id h5PBqOl14869 for ; Wed, 25 Jun 2003 12:52:25 +0100 Date: Wed, 25 Jun 2003 12:52:21 +0100 From: Paul Thomas To: "pgsql-performance @ postgresql . org" Subject: Re: Performance advice Message-ID: <20030625125221.A11482@bacon> References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: ; from michael.mattox@verideon.com on Wed, Jun 25, 2003 at 10:47:48 +0100 X-Mailer: Balsa 1.2.3 Lines: 26 X-Archive-Number: 200306/156 X-Sequence-Number: 2240 On 25/06/2003 10:47 Michael Mattox wrote: > I'm using Java Data Objects (JDO) which is an O/R mapper. It generated > the > schema from my object model by default it used a table for a sequence. I > just got finished configuring it to use a real postgres sequence. With > the > way they have it designed, it opens and closes a connection each time it > retrieves a sequence. Would I get a performance increase if I modify > their > code to retrieve multiple sequence numbers in one connection? For > example I > could have it grab 50 at a time, which would replace 50 connections with > 1. For best performance, you really should consider using a connection pool as it removes the overhead of creating and closing connections. -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+