Re: BUG #1756: PQexec eats huge amounts of memory

Поиск
Список
Период
Сортировка
От Denis Vlasenko
Тема Re: BUG #1756: PQexec eats huge amounts of memory
Дата
Msg-id 200507070951.54660.vda@ilport.com.ua
обсуждение исходный текст
Ответ на Re: BUG #1756: PQexec eats huge amounts of memory  (Neil Conway <neilc@samurai.com>)
Ответы Re: BUG #1756: PQexec eats huge amounts of memory  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-bugs
On Thursday 07 July 2005 08:54, Neil Conway wrote:
> Denis Vlasenko wrote:
> > Symptom: even the simplest query
> > $result = pg_query($db, "SELECT * FROM big_table");
> > eats enormous amounts of memory on server
> > (proportional to table size).
>
> Right, which is exactly what you would expect. The entire result set is
> sent to the client and stored in local memory; if you only want to
> process part of the result set at a time, use a cursor.

The same php script but done against Oracle does not have this
behaviour.

> (And I'm a little suspicious that the performance of "SELECT * FROM
> big_table" will contribute to a meaningful comparison between database
> systems.)

I wanted to show colleagues which are Oracle admins that peak
data fetch rate of PostgreSQL is way better than Oracle one.

While it turned out to be true (Oracle+WinNT = 2kb TCP output buffer,
~1Mb/s over 100Mbit; PostgreSQL+Linux = 8kb buffer, ~2.6Mb/s),
I was ridiculed instead when my php script failed miserably,
crashing Apache with OOM condition, while alanogous script for Oracle
ran to completion just fine.
--
vda

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

Предыдущее
От: Denis Vlasenko
Дата:
Сообщение: Re: BUG #1756: PQexec eats huge amounts of memory
Следующее
От: "Boris Sukholitko"
Дата:
Сообщение: BUG #1759: domain check constraint ignored in prepared statement