pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Nathanael Terrien <nte@mustinformatique.fr>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?
Date: Fri, 5 Dec 2014 14:06:04 +0200
Message-ID: <54819FAC.7030103@vmware.com> (raw)
In-Reply-To: <20141205115919.GC1768@alvh.no-ip.org>
References: <52dd07051f6b42b09328c339c7b9c5d4@EXCH2013.mustinformatique.fr>
	<20141205115919.GC1768@alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 12/05/2014 01:59 PM, Alvaro Herrera wrote:
> Now that I think about this, maybe the cache in your case is not being
> useful for some reason or other, and it's causing more of a slowdown.
> Is this plpgsql?  If so, do you have EXCEPTION blocks in plpgsql code?
> Maybe SAVEPOINTs somewhere?  (Does the ODBC driver create SAVEPOINTs
> automatically?)

Ah, good point. psqlodbc does create SAVEPOINTs automatically, if you 
run in the "statement" "rollback on error" mode. That is, Protocol=*-2 
mode. It is the default.

You could try setting Protocol=7.4-0 in the config file (or set the 
corresponding option in the ODBC configuration GUI) and see if it helps. 
That changes the behaviour on errors, so that when an error happens the 
whole transaction is rolled back, rather than just the statement. I 
don't know if that's acceptable for your application, but if it is, you 
should change that setting, because that gets rid of the extra SAVEPOINT 
commands, and improves performance. Even if it turns out not to be the 
cause of the exponential slowdown.

- Heikki



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (8+ messages)  latest in thread

Message-ID: <54819FAC.7030103@vmware.com>
Permalink:  ../54819FAC.7030103@vmware.com/
Also on:    postgresql.org/message-id/54819FAC.7030103@vmware.com

 · 

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-odbc@postgresql.org
  Cc: hlinnakangas@vmware.com, alvherre@2ndquadrant.com, nte@mustinformatique.fr
  Subject: Re: Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?
  In-Reply-To: <54819FAC.7030103@vmware.com>
  References: <52dd07051f6b42b09328c339c7b9c5d4@EXCH2013.mustinformatique.fr> <20141205115919.GC1768@alvh.no-ip.org> <54819FAC.7030103@vmware.com>

* 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