Re: dumping 8M bit fields

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Rajarshi Guha <rguha(at)indiana(dot)edu>
Cc: PostgreSQL Mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: dumping 8M bit fields
Date: 2006-09-22 10:24:32
Message-ID: 20060922102432.GC25320@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alain Roger 2006-09-22 11:31:40 PG_DUMP without asking password
Previous Message Ragnar 2006-09-22 09:19:18 Re: Select Cast Error