From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Kees Kling <ckling@planet.nl>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: storing large arrays of floats
Date: Fri, 02 Nov 2007 20:56:01 +0000
Message-ID: <472B8EE1.5090307@enterprisedb.com> (raw)
In-Reply-To: <472B8311.6080505@planet.nl>
References: <472B8311.6080505@planet.nl>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: heikki@enterprisedb.com, ckling@planet.nl
Subject: Re: storing large arrays of floats
In-Reply-To: <472B8EE1.5090307@enterprisedb.com>
References: <472B8311.6080505@planet.nl> <472B8EE1.5090307@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox