Re: Disk buffering of resultsets

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Disk buffering of resultsets
Дата
Msg-id 543007D4.6070109@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Disk buffering of resultsets  ("Lussier, Denis" <denisl@openscg.com>)
Список pgsql-jdbc
On 09/23/2014 09:55 AM, Lussier, Denis wrote:
> Wow...  really glad Tom chimed in on this.    I've been promoting/using
> PG as an enterprise-class database for over a decade and I was
> struggling with the "fact" that the server doesn't iterate thru a cursor
> without bringing it all into memory.

Well, that assertion would've failed the common-sense sanity test anyway.

You can `SELECT * FROM my_100GB_table` on a machine with 1GB of RAM.
Clearly this is impossible if Pg must marshal all the results into RAM
first.

I think John's misapprehension probably stemmed from the fact that libpq
and many other clients *default* to fetching the whole result from the
server into RAM before reporting success to the caller. This makes it
*seem* like the server must marshal the whole result in memory, but it's
the client doing that, not the server.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Disk buffering of resultsets
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Disk buffering of resultsets