Re: Query Failed, out of memory

Lists: pgsql-hackers
From: "Luke Lonergan" <LLonergan(at)greenplum(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query Failed, out of memory
Date: 2006-10-05 16:52:33
Message-ID: 3E37B936B592014B978C4415F90D662D03EA249E@MI8NYCMAIL06.Mi8.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Create table as select ... Order by ...

Copy to ...

- Luke

Msg is shrt cuz m on ma treo

-----Original Message-----
From: Andrew Dunstan [mailto:andrew(at)dunslane(dot)net]
Sent: Thursday, October 05, 2006 12:51 PM Eastern Standard Time
To: Tom Lane
Cc: Mark Woodward; pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Query Failed, out of memory

Tom Lane wrote:
> "Mark Woodward" <pgsql(at)mohawksoft(dot)com> writes:
>
>> psql -p 5435 -U pgsql -t -A -c "select client, item, rating, day from
>> ratings order by client" netflix > netflix.txt
>>
>
> FWIW, there's a feature in CVS HEAD to instruct psql to try to use a
> cursor to break up huge query results like this. For the moment I'd
> suggest using COPY instead.
>
>
>

but COPY doesn't guarantee any order.

BTW, I just this morning discovered the hard way that our linux boxes
didn't have strict memory allocation turned on, and then went and set
it. I'd advise Mark to do the same, if he hasn't already.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly


From: Neil Conway <neilc(at)samurai(dot)com>
To: Luke Lonergan <LLonergan(at)greenplum(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mark Woodward <pgsql(at)mohawksoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query Failed, out of memory
Date: 2006-10-05 18:34:32
Message-ID: 1160073272.5577.6.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 2006-10-05 at 12:52 -0400, Luke Lonergan wrote:
> Create table as select ... Order by ...
>
> Copy to ...

Or in 8.2, "COPY TO (SELECT ... ORDER BY)" (My, that's a neat feature.)

-Neil