pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Lazarus <drlaz@attglobal.net>
To: pgsql-jdbc@postgresql.org
Cc: Conor Beverland <cb801@doc.ic.ac.uk>
Subject: Re: setArray()
Date: Tue, 13 Jan 2004 06:52:44 -0800
Message-ID: <013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP> (raw)
References: <Pine.LNX.4.58.0401121428070.7711@active45.doc.ic.ac.uk>

I have the same issue, but my Array is much smaller. As you see downthread,
there is no practical way to use setArray().

As for speed: Are you using a StringBuffer allocated sufficiently large to
begin with, not a String? (My last line is

return new String(sbuffer);

HTH.

----- Original Message ----- 
From: "Conor Beverland" <cb801@doc.ic.ac.uk>
To: <pgsql-jdbc@postgresql.org>
Sent: Monday, January 12, 2004 6:40 AM
Subject: [JDBC] setArray()


> Hi,
>
> I'd like to insert a large array of integers into the database (15000)
> However I can't seem to get PreparedStatement.setArray() to work.
>
> I saw a patch in the archives regarding this but I'm not in control of
> the java installation which I'm using.
>
> I'm currently converting my array into a string before inserting it
> and using setString()... However this is *very* slow!
>
> Any advice would be much appreciated,
> Conor
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match




view thread (6+ messages)  latest in thread

Message-ID: <013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP>
Permalink:  ../013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP/
Also on:    postgresql.org/message-id/013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP

 · 

reply

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: drlaz@attglobal.net, cb801@doc.ic.ac.uk
  Subject: Re: setArray()
  In-Reply-To: <013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP>
  References: <Pine.LNX.4.58.0401121428070.7711@active45.doc.ic.ac.uk> <013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP>

* 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