Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization

Поиск
Список
Период
Сортировка
От Leon Winter
Тема Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization
Дата
Msg-id 20171020074154.hxe3crrpantixro5@bfw-online.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization  (Geoff Winkless <pgsqladmin@geoff.dj>)
Список 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 по дате отправления:

Предыдущее
От: Leon Winter
Дата:
Сообщение: Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization
Следующее
От: Leon Winter
Дата:
Сообщение: Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization