Re: [PERFORM] Correct use of cursors for very large result sets in Postgres

Поиск
Список
Период
Сортировка
От Mike Beaton
Тема Re: [PERFORM] Correct use of cursors for very large result sets in Postgres
Дата
Msg-id CAHzAAWSRPmJLqoKwkCndBH-U=moULwV=o=NTd=pcoEkHvD9kyw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PERFORM] Correct use of cursors for very large result sets in Postgres  (Mike Beaton <mjsbeaton@gmail.com>)
Список pgsql-performance
The generated buffer is 140MB, not 14MB. At 14 bytes per row, that makes sense.

I have done another test.

If I execute `FETCH ALL FROM cursor` I get a 140MB disk buffer file, on the PostgreSQL server, reported in its log.

If I execute `FETCH 5000000 FROM cursor` (exactly half the rows), I see a 70MB disk buffer file.

This is regardless of how many rows I actually stream from thE connection before closing the cursor.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Diego Vargas
Дата:
Сообщение: [PERFORM] Query Performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PERFORM] Correct use of cursors for very large result sets in Postgres