Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization

Поиск
Список
Период
Сортировка
От Leon Winter
Тема Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization
Дата
Msg-id 20171020091101.2qabecra6gvx4zpu@bfw-online.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Cursor With_Hold Performance Workarounds/Optimization  (Leon Winter <winter-pg@bfw-online.de>)
Список pgsql-hackers
> When we declare a cursor for a select on the mentioned big table, it takes
> multiple seconds and a big temp file is created which to me seems like the
> materialization took place immediately.

Since you mentioned, Postgres already postponed materialization until commit
operations we checked again and you were right. When we manually checked, we
executed a "declare" statement without opening a transaction block first, which
causes instant materialization. When a transaction is opened, it is in fact
postponed.
Unfortunately we do not use cursors but portals so we can (re-)use prepared
statements in multiple instances and there is not "hold" feature for portals so
we cannot benefit from the lazy "with hold" of the cursor.


-- 
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 по дате отправления:

Предыдущее
От: Sokolov Yura
Дата:
Сообщение: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] More stats about skipped vacuums