Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization - Mailing list pgsql-hackers

From Leon Winter
Subject Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization
Date
Msg-id 20171020074154.hxe3crrpantixro5@bfw-online.de
Whole thread Raw
In response to Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
> > The calculations inside the loop are written in some dynamic high-level
> > language and cannot easily be translated into SQL.
> >
> 
> ???Can you not simply create a second connection to perform the updates?

That would be possibe, but I can see some problems:
loop
{ update table1; select something from table1; update table2 based in updated table1; commit;
}

If we do all the "update" statements in their own transaction, the select
statements would not be able to see changes. What we also tried was to give
every loop its own connection but that did not scale too well.


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

pgsql-hackers by date:

Previous
From: Leon Winter
Date:
Subject: Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization
Next
From: Leon Winter
Date:
Subject: Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization