Re: Performance advice

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: "pgsql-performance (at) postgresql (dot) org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance advice
Date: 2003-06-25 11:52:21
Message-ID: 20030625125221.A11482@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


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 |
+------------------------------+---------------------------------------------+

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Rod Taylor 2003-06-25 11:54:20 Re: How to optimize monstrous query, sorts instead of using index
Previous Message Michael Mattox 2003-06-25 11:46:48 How to optimize monstrous query, sorts instead of using index