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

From: Neil Conway <neilc(at)samurai(dot)com>
To: Denis Vlasenko <vda(at)ilport(dot)com(dot)ua>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1756: PQexec eats huge amounts of memory
Date: 2005-07-07 05:54:29
Message-ID: 42CCC395.7080204@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

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

-Neil

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Denis Vlasenko 2005-07-07 06:51:54 Re: BUG #1756: PQexec eats huge amounts of memory
Previous Message Denis Vlasenko 2005-07-07 05:21:38 Re: BUG #1756: PQexec eats huge amounts of memory