Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group