Re: Postgres and multiple updates in one statement - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Postgres and multiple updates in one statement
Date
Msg-id 4A6DA6A2.1080307@iol.ie
Whole thread Raw
In response to Postgres and multiple updates in one statement  ("Jamie Lawrence-Jenner" <jamie.jenner@autovhc.co.uk>)
Responses Re: Postgres and multiple updates in one statement
List pgsql-general
On 27/07/2009 09:10, Jamie Lawrence-Jenner wrote:

> Apart from saving on the overhead of having to open up 5 separate
> connections, what are the benefits to passing in multiple updates in one
> statement?

If you do them all within one transaction -

  begin;
  update....
  update...
  ...
  commit;

- then you save on the overhead associated with beginning and committing
a transaction for each update.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: "Jamie Lawrence-Jenner"
Date:
Subject: Postgres and multiple updates in one statement
Next
From: Scott Marlowe
Date:
Subject: Re: Postgres and multiple updates in one statement