Re: Large Result and Memory Limit

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Mike Ginsburg <mginsburg(at)collaborativefusion(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Large Result and Memory Limit
Date: 2007-10-04 20:05:37
Message-ID: 20071004200537.GB28896@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Ginsburg wrote:
> Hello,
> I am working on a personnel registry that has upwards of 50,000
> registrants. Currently I am working on an export module that will create a
> CSV from multiple tables. I have managed to keep the script (PHP) under
> the memory limit when creating and inserting the CSV into the database.
> The problem comes when I try to query for the data and export it. Memory
> limit is a major concern, but the query for one row returns a result set
> too large and PHP fails.

One row? Wow, I didn't know PHP was that broken.

Try declaring a cursor and fetching a few rows at a time.

--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"No es bueno caminar con un hombre muerto"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message André Volpato 2007-10-04 20:12:27 Re: Large Result and Memory Limit
Previous Message Mike Ginsburg 2007-10-04 19:57:42 Re: Large Result and Memory Limit