Re: Out of memry with large result set - Mailing list pgsql-general

From Klint Gore
Subject Re: Out of memry with large result set
Date
Msg-id 487C30DB.4000702@une.edu.au
Whole thread Raw
In response to Out of memry with large result set  ("olivier.scalbert@algosyn.com" <olivier.scalbert@algosyn.com>)
List pgsql-general
olivier.scalbert@algosyn.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@une.edu.au


pgsql-general by date:

Previous
From: "Andrew Maclean"
Date:
Subject: Backing up and deleting a database.
Next
From: "Dann Corbit"
Date:
Subject: Re: Installing PostgreSQL without using CygWin