Re: dumping 8M bit fields - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: dumping 8M bit fields
Date
Msg-id 20060922102432.GC25320@svana.org
Whole thread Raw
In response to dumping 8M bit fields  (Rajarshi Guha <rguha@indiana.edu>)
List pgsql-general
On Thu, Sep 21, 2006 at 08:14:49PM -0400, Rajarshi Guha wrote:
> Hi, I have a table with 8M rows and one of the fields is a bit (1024
> bits) field. I am trying to dump the bit field for 8M rows to a file:

<snip>
> out of memory for query result
>
> I am surprised since I did an equivalent query but selecting varchar
> field for 6.9M rows which worked fine.

The memory needed is related to how much screen space it takes. So a
1024 bitfield takes 1024 bytes to display. Times 6.9M rows is about 7GB
of data.

If the itention is to get all the data out into a file, try COPY. That
just dumps the data, without trying to store it first.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: Select Cast Error
Next
From: "Alain Roger"
Date:
Subject: PG_DUMP without asking password