Re: storing large arrays of floats

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: storing large arrays of floats
Дата
Msg-id 472B8EE1.5090307@enterprisedb.com
обсуждение исходный текст
Ответ на storing large arrays of floats  (Kees Kling <ckling@planet.nl>)
Список pgsql-jdbc
Kees Kling wrote:
> I have to store an array of 50,000 floats in a postgres database. At
> firts I tried to store it as float[], but that take s to much time  for
> jdbc to convert the data  so that it  can be stored in the database.
> Next I tried to store it as byte[] array in a BYTEA column. This worked
> ok, but when I inspect the data at the serverside the datasize increased
> with a factor 1,5 to 2 and I see a lot of escape(\0) characters. What I
> mean to do is storing the bunch of data and retrieving subselections of
> the data with the help of Plperl fucntions. Now I can't restore the data
> at serverside. What is the clue? Do I have to store the data with
> another function as "preparedstatement.setBytes" or must I use another
> columntype.

Sounds like you need to rethink your schema. Instead of using an array,
consider using a child table.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Kees Kling
Дата:
Сообщение: storing large arrays of floats
Следующее
От: Kevin Neufeld
Дата:
Сообщение: Parsed Query Trees