out of memory for query result

From: Allen <dba(at)girders(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: out of memory for query result
Date: 2005-10-22 19:46:18
Message-ID: 435A970A.30507@girders.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to select a result set from a 2-table join, which should be
returning 5,045,358 rows. I receive this error:

DBD::Pg::st execute failed: out of memory for query result

I am using Perl with DBI cursor (so i think) to retreive the data
(prepare, execute, fetchrow_hashref, ..., finish). Perhaps either the
DBD or libpq or something is buffering the result and not passing
individual rows from the server (which runs on the same server as the
application).

I am using Postgres 7.4.7, under 4.11-RELEASE FreeBSD 4.11-RELEASE using
perl v5.8.6 and DBD-Pg-1.32_1.

Any suggestions on how to avoid this? Should i be using the API
differently with Perl?

Thanks,
Allen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zlatko Matić 2005-10-22 20:05:41 pg_autovacuum (8.0.4) as Windows service ?
Previous Message Tom Lane 2005-10-22 16:04:59 Re: How much slower are numerics?