Re: Cursor With_Hold Performance Workarounds/Optimization

From: Leon Winter <winter-pg(at)bfw-online(dot)de>
To: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cursor With_Hold Performance Workarounds/Optimization
Date: 2017-10-20 07:41:54
Message-ID: 20171020074154.hxe3crrpantixro5@bfw-online.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Leon Winter 2017-10-20 07:57:38 Re: Cursor With_Hold Performance Workarounds/Optimization
Previous Message Leon Winter 2017-10-20 07:34:17 Re: Cursor With_Hold Performance Workarounds/Optimization