Re: dumping 8M bit fields

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: dumping 8M bit fields
Дата
Msg-id 20060922102432.GC25320@svana.org
обсуждение исходный текст
Ответ на dumping 8M bit fields  (Rajarshi Guha <rguha@indiana.edu>)
Список 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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Ragnar
Дата:
Сообщение: Re: Select Cast Error
Следующее
От: "Alain Roger"
Дата:
Сообщение: PG_DUMP without asking password