pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Thomas <paul@tmsl.demon.co.uk>
To: pgsql-performance @ postgresql . org <pgsql-performance@postgresql.org>
Subject: Re: Performance advice
Date: Wed, 25 Jun 2003 12:52:21 +0100
Message-ID: <20030625125221.A11482@bacon> (raw)
In-Reply-To: <CJEBLDCHAADCLAGIGCOOCEKBCKAA.michael.mattox@verideon.com>
References: <k3hifvg6on4qckbo5qjktptckf5tvfghp6@4ax.com>
	<CJEBLDCHAADCLAGIGCOOCEKBCKAA.michael.mattox@verideon.com>


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



view thread (23+ messages)  latest in thread

Message-ID: <20030625125221.A11482@bacon>
Permalink:  ../20030625125221.A11482@bacon/
Also on:    postgresql.org/message-id/20030625125221.A11482@bacon

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: paul@tmsl.demon.co.uk
  Subject: Re: Performance advice
  In-Reply-To: <20030625125221.A11482@bacon>
  References: <k3hifvg6on4qckbo5qjktptckf5tvfghp6@4ax.com> <CJEBLDCHAADCLAGIGCOOCEKBCKAA.michael.mattox@verideon.com> <20030625125221.A11482@bacon>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox