Re: Out of memry with large result set

From: Klint Gore <kgore4(at)une(dot)edu(dot)au>
To: "olivier(dot)scalbert(at)algosyn(dot)com" <olivier(dot)scalbert(at)algosyn(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memry with large result set
Date: 2008-07-15 05:08:43
Message-ID: 487C30DB.4000702@une.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

olivier(dot)scalbert(at)algosyn(dot)com wrote:
> I am doing a query via psql on a huge database, and I want to have its
> output piped to other unix processes.
> As the result set is very big, I've got: "out of memory for query
> result".
> How can I manage that, without playing with cursors, as I do not want
> to change the sql query ?
>
> Under mysql, I have the same issue, but by using: mysql -quick, I have
> what I want.
> Is there something equivalent under postgresql ? Or should I use
> another clients ?
>
>

Try copy (query) to stdout.

For me, psql sits at 4.9mb ram on a 3x10^16 row query.

klint.

--
Klint Gore
Database Manager
Sheep CRC
A.G.B.U.
University of New England
Armidale NSW 2350

Ph: 02 6773 3789
Fax: 02 6773 3266
EMail: kgore4(at)une(dot)edu(dot)au

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Klint Gore 2008-07-15 05:30:09 download latest points to wrong place [was Re: Installing PostgreSQL without using CygWin]
Previous Message Dann Corbit 2008-07-15 05:01:31 Re: Installing PostgreSQL without using CygWin